From 51b95502776e23711259722219e3afde9318ee4a Mon Sep 17 00:00:00 2001 From: "andybons@chromium.org" Date: Wed, 10 Nov 2010 16:12:52 +0000 Subject: First round of audits to make sure 'app' is displayed instead of 'extension' where appropriate. This includes some cleanup and deletion of stale/unused code surrounding apps and extensions. BUG=61259 TEST=Make sure proper wording is used when dealing with apps instead of extensions. Review URL: http://codereview.chromium.org/4753001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65663 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/app/generated_resources.grd | 83 ++++------- chrome/app/nibs/ExtensionInstallPrompt.xib | 160 +++++++++++++++++++-- chrome/browser/download/download_util.cc | 112 +++++++-------- .../extension_disabled_infobar_delegate.cc | 5 +- .../browser/gtk/extension_install_prompt2_gtk.cc | 5 +- .../views/extensions/extension_install_prompt.cc | 3 +- .../views/extensions/extension_install_prompt2.cc | 6 +- .../views/extensions/extension_installed_bubble.cc | 85 ++--------- .../views/extensions/extension_installed_bubble.h | 1 - chrome/common/extensions/extension.cc | 22 +-- 10 files changed, 252 insertions(+), 230 deletions(-) diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index c8cd6ee..940e6d2 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -3545,99 +3545,67 @@ each locale. --> Undo - + The newest version of the extension "$1Flashblock" requires more permissions, so it has been disabled. - - Re-enable + + The newest version of the app "$1Pandora" requires more permissions, so it has been disabled. - - - - Extension install failed: extensions are not supported in incognito windows. + + Re-enable - - + + Confirm Installation - + Confirm Uninstallation - + Install $1Gmail Checker? - - Create desktop shortcut - - + Uninstall "$1Gmail Checker"? - - This extension will have access to your browsing history. - - - This extension will have access to your private data on $1maps.google.com. - - - This extension will have access to your browsing history and private data on $1maps.google.com. - - - This extension will have access to your private data on multiple websites. - - - This extension will have access to your browsing history and private data on multiple websites. - - - This extension will have access to your private data on all websites. - - - This extension will have access to your browsing history and private data on all websites. - - - This extension will have full access to your computer and private data. - - - - This extension can access: - - - This app can access: + + + It can access: - + All data on your computer and the websites you visit - + Your data on all websites - + Your data on $1www.google.com - + Your data on $1www.google.com and $2www.reddit.com - + Your data on $1www.google.com, $2www.reddit.com, and $3news.ycombinator.com - + Your data on $1www.google.com, $2www.yahoo.com, and $33 other websites - + Your bookmarks - + Your browsing history - + Your physical location - + Manage themes, extensions, and apps - + Input directory must exist. @@ -3741,9 +3709,6 @@ each locale. --> Manage extensions... - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque feugiat, magna quis vestibulum malesuada, lazy euros facilitatus nibbles, you faucibus purus lacus ac dolor! - You can manage your installed extensions by clicking Extensions in the Tools menu. diff --git a/chrome/app/nibs/ExtensionInstallPrompt.xib b/chrome/app/nibs/ExtensionInstallPrompt.xib index fa8da25..302c4d7 100644 --- a/chrome/app/nibs/ExtensionInstallPrompt.xib +++ b/chrome/app/nibs/ExtensionInstallPrompt.xib @@ -2,17 +2,17 @@ 1050 - 10B504 - 732 - 1038.2 - 437.00 + 10F569 + 788 + 1038.29 + 461.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 788 YES - + YES @@ -97,7 +97,7 @@ 67239424 272760832 - ^IDS_EXTENSION_PROMPT2_WILL_HAVE_ACCESS_TO + ^IDS_EXTENSION_PROMPT_WILL_HAVE_ACCESS_TO LucidaGrande 11 @@ -568,9 +568,9 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA YES com.apple.InterfaceBuilder.CocoaPlugin - {{1102, 837}, {387, 167}} + {{381, 506}, {387, 167}} com.apple.InterfaceBuilder.CocoaPlugin - {{1102, 837}, {387, 167}} + {{381, 506}, {387, 167}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -633,6 +633,25 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA id + + YES + + YES + cancel: + ok: + + + YES + + cancel: + id + + + ok: + id + + + YES @@ -656,6 +675,50 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA NSTextField + + YES + + YES + cancelButton_ + iconView_ + okButton_ + subtitleField_ + titleField_ + warningsBox_ + warningsField_ + + + YES + + cancelButton_ + NSButton + + + iconView_ + NSImageView + + + okButton_ + NSButton + + + subtitleField_ + NSTextField + + + titleField_ + NSTextField + + + warningsBox_ + NSBox + + + warningsField_ + NSTextField + + + IBProjectSource browser/cocoa/extensions/extension_install_prompt_controller.h @@ -679,6 +742,30 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA id + + YES + + YES + otherObjectToLocalize_ + owner_ + yetAnotherObjectToLocalize_ + + + YES + + otherObjectToLocalize_ + id + + + owner_ + id + + + yetAnotherObjectToLocalize_ + id + + + IBProjectSource ../third_party/GTM/AppKit/GTMUILocalizer.h @@ -702,6 +789,30 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA id + + YES + + YES + localizerOwner_ + localizer_ + uiObject_ + + + YES + + localizerOwner_ + id + + + localizer_ + GTMUILocalizer + + + uiObject_ + id + + + IBProjectSource ../third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h @@ -718,6 +829,13 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA NSObject IBProjectSource + browser/cocoa/objc_zombie.h + + + + NSObject + + IBProjectSource browser/cocoa/status_bubble_mac.h @@ -729,10 +847,24 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA + NSView + + IBProjectSource + browser/cocoa/view_id_util.h + + + + NSWindow + + IBProjectSource + browser/cocoa/framed_browser_window.h + + + NSWindow IBProjectSource - browser/cocoa/chrome_browser_window.h + browser/cocoa/nswindow_additions.h @@ -1437,6 +1569,13 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA showWindow: id + + showWindow: + + showWindow: + id + + IBFrameworkSource AppKit.framework/Headers/NSWindowController.h @@ -1445,6 +1584,7 @@ ARcABAAAAAEAAAACARwAAwAAAAEAAQAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc index 193ccaa..a0d774a 100644 --- a/chrome/browser/download/download_util.cc +++ b/chrome/browser/download/download_util.cc @@ -230,52 +230,35 @@ void OpenChromeExtension(Profile* profile, DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(download_item.is_extension_install()); - // We don't support extensions in OTR mode. ExtensionsService* service = profile->GetExtensionsService(); - if (service) { - NotificationService* nservice = NotificationService::current(); - GURL nonconst_download_url = download_item.url(); - nservice->Notify(NotificationType::EXTENSION_READY_FOR_INSTALL, - Source(download_manager), - Details(&nonconst_download_url)); - - scoped_refptr installer( - new CrxInstaller(service->install_directory(), - service, - new ExtensionInstallUI(profile))); - installer->set_delete_source(true); - - if (UserScript::HasUserScriptFileExtension(download_item.url())) { - installer->InstallUserScript(download_item.full_path(), - download_item.url()); - } else { - bool is_gallery_download = service->IsDownloadFromGallery( - download_item.url(), download_item.referrer_url()); - installer->set_original_mime_type(download_item.original_mime_type()); - installer->set_apps_require_extension_mime_type(true); - installer->set_allow_privilege_increase(true); - installer->set_original_url(download_item.url()); - installer->set_is_gallery_install(is_gallery_download); - installer->InstallCrx(download_item.full_path()); - installer->set_allow_silent_install(is_gallery_download); - } - } else { - TabContents* contents = NULL; - // Get last active normal browser of profile. - Browser* last_active = - BrowserList::FindBrowserWithType(profile, Browser::TYPE_NORMAL, true); - if (last_active) - contents = last_active->GetSelectedTabContents(); - if (contents) { - contents->AddInfoBar( - new SimpleAlertInfoBarDelegate(contents, - l10n_util::GetStringUTF16( - IDS_EXTENSION_INCOGNITO_INSTALL_INFOBAR_LABEL), - ResourceBundle::GetSharedInstance().GetBitmapNamed( - IDR_INFOBAR_PLUGIN_INSTALL), - true)); - } + CHECK(service); + NotificationService* nservice = NotificationService::current(); + GURL nonconst_download_url = download_item.url(); + nservice->Notify(NotificationType::EXTENSION_READY_FOR_INSTALL, + Source(download_manager), + Details(&nonconst_download_url)); + + scoped_refptr installer( + new CrxInstaller(service->install_directory(), + service, + new ExtensionInstallUI(profile))); + installer->set_delete_source(true); + + if (UserScript::HasUserScriptFileExtension(download_item.url())) { + installer->InstallUserScript(download_item.full_path(), + download_item.url()); + return; } + + bool is_gallery_download = service->IsDownloadFromGallery( + download_item.url(), download_item.referrer_url()); + installer->set_original_mime_type(download_item.original_mime_type()); + installer->set_apps_require_extension_mime_type(true); + installer->set_allow_privilege_increase(true); + installer->set_original_url(download_item.url()); + installer->set_is_gallery_install(is_gallery_download); + installer->InstallCrx(download_item.full_path()); + installer->set_allow_silent_install(is_gallery_download); } // Download progress painting -------------------------------------------------- @@ -724,26 +707,26 @@ int GetUniquePathNumberWithCrDownload(const FilePath& path) { } namespace { - -// NOTE: If index is 0, deletes files that do not have the " (nnn)" appended. -void DeleteUniqueDownloadFile(const FilePath& path, int index) { - FilePath new_path(path); - if (index > 0) - AppendNumberToPath(&new_path, index); - file_util::Delete(new_path, false); -} - -} - -void EraseUniqueDownloadFiles(const FilePath& path) { - FilePath cr_path = GetCrDownloadPath(path); - - for (int index = 0; index <= kMaxUniqueFiles; ++index) { - DeleteUniqueDownloadFile(path, index); - DeleteUniqueDownloadFile(cr_path, index); - } -} - + +// NOTE: If index is 0, deletes files that do not have the " (nnn)" appended. +void DeleteUniqueDownloadFile(const FilePath& path, int index) { + FilePath new_path(path); + if (index > 0) + AppendNumberToPath(&new_path, index); + file_util::Delete(new_path, false); +} + +} + +void EraseUniqueDownloadFiles(const FilePath& path) { + FilePath cr_path = GetCrDownloadPath(path); + + for (int index = 0; index <= kMaxUniqueFiles; ++index) { + DeleteUniqueDownloadFile(path, index); + DeleteUniqueDownloadFile(cr_path, index); + } +} + FilePath GetCrDownloadPath(const FilePath& suggested_path) { FilePath::StringType file_name; base::SStringPrintf( @@ -771,3 +754,4 @@ bool IsDangerous(DownloadCreateInfo* info, Profile* profile) { } } // namespace download_util + diff --git a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc index af38e4f..d66a448 100644 --- a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc +++ b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc @@ -78,8 +78,9 @@ class ExtensionDisabledInfobarDelegate virtual ~ExtensionDisabledInfobarDelegate() { } virtual string16 GetMessageText() const { - return l10n_util::GetStringFUTF16(IDS_EXTENSION_DISABLED_INFOBAR_LABEL, - UTF8ToUTF16(extension_->name())); + return l10n_util::GetStringFUTF16(extension_->is_app() ? + IDS_APP_DISABLED_INFOBAR_LABEL : IDS_EXTENSION_DISABLED_INFOBAR_LABEL, + UTF8ToUTF16(extension_->name())); } virtual SkBitmap* GetIcon() const { return NULL; diff --git a/chrome/browser/gtk/extension_install_prompt2_gtk.cc b/chrome/browser/gtk/extension_install_prompt2_gtk.cc index cf78028..10ee4e4 100644 --- a/chrome/browser/gtk/extension_install_prompt2_gtk.cc +++ b/chrome/browser/gtk/extension_install_prompt2_gtk.cc @@ -107,11 +107,8 @@ void ShowInstallPromptDialog2(GtkWindow* parent, SkBitmap* skia_icon, !show_permissions, !show_permissions, 0); if (show_permissions) { - int label = extension->is_app() ? - IDS_EXTENSION_PROMPT2_APP_WILL_HAVE_ACCESS_TO : - IDS_EXTENSION_PROMPT2_WILL_HAVE_ACCESS_TO; GtkWidget* warning_label = gtk_label_new(l10n_util::GetStringUTF8( - label).c_str()); + IDS_EXTENSION_PROMPT_WILL_HAVE_ACCESS_TO).c_str()); gtk_misc_set_alignment(GTK_MISC(warning_label), 0.0, 0.5); gtk_util::SetLabelWidth(warning_label, kRightColumnMinWidth); diff --git a/chrome/browser/ui/views/extensions/extension_install_prompt.cc b/chrome/browser/ui/views/extensions/extension_install_prompt.cc index 5cf1e7b..1e1ea37 100644 --- a/chrome/browser/ui/views/extensions/extension_install_prompt.cc +++ b/chrome/browser/ui/views/extensions/extension_install_prompt.cc @@ -102,8 +102,7 @@ class InstallDialogContent : public views::View, public views::DialogDelegate { int height = kPanelVertMargin * 2; height += heading_->GetHeightForWidth(kRightColumnWidth); - return gfx::Size(width, - std::max(height, kIconSize + kPanelVertMargin * 2)); + return gfx::Size(width, std::max(height, kIconSize + kPanelVertMargin * 2)); } virtual void Layout() { diff --git a/chrome/browser/ui/views/extensions/extension_install_prompt2.cc b/chrome/browser/ui/views/extensions/extension_install_prompt2.cc index ba9631e..c7ea367 100644 --- a/chrome/browser/ui/views/extensions/extension_install_prompt2.cc +++ b/chrome/browser/ui/views/extensions/extension_install_prompt2.cc @@ -140,10 +140,8 @@ InstallDialogContent2::InstallDialogContent2( right_column_width_ = kNoPermissionsRightColumnWidth; } else { right_column_width_ = kPermissionBoxWidth; - int label = extension->is_app() ? - IDS_EXTENSION_PROMPT2_APP_WILL_HAVE_ACCESS_TO : - IDS_EXTENSION_PROMPT2_WILL_HAVE_ACCESS_TO; - will_have_access_to_ = new views::Label(l10n_util::GetString(label)); + will_have_access_to_ = new views::Label( + l10n_util::GetString(IDS_EXTENSION_PROMPT_WILL_HAVE_ACCESS_TO)); will_have_access_to_->SetMultiLine(true); will_have_access_to_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); AddChildView(will_have_access_to_); diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc index 8cb9397..4f4925d 100644 --- a/chrome/browser/ui/views/extensions/extension_installed_bubble.cc +++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.cc @@ -11,21 +11,16 @@ #include "chrome/browser/browser.h" #include "chrome/browser/browser_window.h" #include "chrome/browser/profile.h" -#include "chrome/browser/shell_integration.h" #include "chrome/browser/views/browser_actions_container.h" #include "chrome/browser/views/frame/browser_view.h" #include "chrome/browser/views/location_bar/location_bar_view.h" -#include "chrome/browser/views/tabs/base_tab.h" -#include "chrome/browser/views/tabs/base_tab_strip.h" #include "chrome/browser/views/toolbar_view.h" -#include "chrome/browser/web_applications/web_app.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_action.h" #include "chrome/common/notification_service.h" #include "chrome/common/notification_type.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" -#include "views/controls/button/checkbox.h" #include "views/controls/button/image_button.h" #include "views/controls/image_view.h" #include "views/controls/label.h" @@ -74,8 +69,7 @@ class InstalledBubbleContent : public views::View, SkBitmap* icon) : info_bubble_(NULL), type_(type), - info_(NULL), - create_shortcut_(false) { + info_(NULL) { ResourceBundle& rb = ResourceBundle::GetSharedInstance(); const gfx::Font& font = rb.GetFont(ResourceBundle::BaseFont); @@ -105,12 +99,8 @@ class InstalledBubbleContent : public views::View, AddChildView(info_); } - std::wstring text; - if (type_ == ExtensionInstalledBubble::EXTENSION_APP) - text = l10n_util::GetString(IDS_EXTENSION_APP_INSTALLED_MANAGE_INFO); - else - text = l10n_util::GetString(IDS_EXTENSION_INSTALLED_MANAGE_INFO); - manage_ = new views::Label(text); + manage_ = new views::Label( + l10n_util::GetString(IDS_EXTENSION_INSTALLED_MANAGE_INFO)); manage_->SetFont(font); manage_->SetMultiLine(true); manage_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); @@ -124,19 +114,8 @@ class InstalledBubbleContent : public views::View, close_button_->SetImage(views::CustomButton::BS_PUSHED, rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); AddChildView(close_button_); - - if (type_ == ExtensionInstalledBubble::EXTENSION_APP) { - create_shortcut_view_ = new views::Checkbox( - l10n_util::GetString(IDS_EXTENSION_PROMPT_CREATE_SHORTCUT)); - create_shortcut_view_->set_listener(this); - create_shortcut_view_->SetMultiLine(true); - AddChildView(create_shortcut_view_); - } } - // Whether to create a shortcut once the bubble closes. - bool create_shortcut() { return create_shortcut_;} - void set_info_bubble(InfoBubble* info_bubble) { info_bubble_ = info_bubble; } virtual void ButtonPressed( @@ -145,8 +124,6 @@ class InstalledBubbleContent : public views::View, if (sender == close_button_) { info_bubble_->set_fade_away_on_close(true); GetWidget()->Close(); - } else if (sender == create_shortcut_view_) { - create_shortcut_ = create_shortcut_view_->checked(); } else { NOTREACHED() << "Unknown view"; } @@ -170,10 +147,7 @@ class InstalledBubbleContent : public views::View, } height += manage_->GetHeightForWidth(kRightColumnWidth); height += kVertOuterMargin; - if (type_ == ExtensionInstalledBubble::EXTENSION_APP) { - height += create_shortcut_view_->GetHeightForWidth(kRightColumnWidth); - height += kVertInnerMargin; - } + return gfx::Size(width, std::max(height, kIconSize + 2 * kVertOuterMargin)); } @@ -207,16 +181,7 @@ class InstalledBubbleContent : public views::View, y += kVertInnerMargin; gfx::Size sz; - if (type_ == ExtensionInstalledBubble::EXTENSION_APP) { - sz.set_height( - create_shortcut_view_->GetHeightForWidth(kRightColumnWidth)); - sz.set_width(kRightColumnWidth); - create_shortcut_view_->SetBounds(x, y, sz.width(), sz.height()); - y += create_shortcut_view_->height(); - y += kVertInnerMargin; - } - - x += kRightColumnWidth + 2*kPanelHorizMargin + kHorizOuterMargin - + x += kRightColumnWidth + 2 * kPanelHorizMargin + kHorizOuterMargin - close_button_->GetPreferredSize().width(); y = kVertOuterMargin; sz = close_button_->GetPreferredSize(); @@ -233,11 +198,8 @@ class InstalledBubbleContent : public views::View, views::Label* heading_; views::Label* info_; views::Label* manage_; - views::Checkbox* create_shortcut_view_; views::ImageButton* close_button_; - bool create_shortcut_; - DISALLOW_COPY_AND_ASSIGN(InstalledBubbleContent); }; @@ -256,9 +218,7 @@ ExtensionInstalledBubble::ExtensionInstalledBubble(const Extension* extension, animation_wait_retries_(0) { AddRef(); // Balanced in InfoBubbleClosing. - if (extension->GetFullLaunchURL().is_valid()) { - type_ = EXTENSION_APP; - } else if (extension_->browser_action()) { + if (extension_->browser_action()) { type_ = BROWSER_ACTION; } else if (extension->page_action() && !extension->page_action()->default_icon_path().empty()) { @@ -332,11 +292,6 @@ void ExtensionInstalledBubble::ShowInternal() { reference_view = location_bar_view->GetPageActionView( extension_->page_action()); DCHECK(reference_view); - } else if (type_ == EXTENSION_APP) { - BaseTabStrip* tabstrip = browser_view->tabstrip(); - BaseTab* tab = tabstrip->GetSelectedBaseTab(); - DCHECK(tab->data().app); - reference_view = tab; } // Default case. @@ -361,28 +316,12 @@ void ExtensionInstalledBubble::ShowInternal() { // InfoBubbleDelegate void ExtensionInstalledBubble::InfoBubbleClosing(InfoBubble* info_bubble, bool closed_by_escape) { - if (extension_) { - if (type_ == PAGE_ACTION) { - BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow( - browser_->window()->GetNativeHandle()); - browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( - extension_->page_action(), - false); // preview_enabled - } else if (type_ == EXTENSION_APP) { - if (bubble_content_->create_shortcut()) { - ShellIntegration::ShortcutInfo shortcut_info; - shortcut_info.url = extension_->GetFullLaunchURL(); - shortcut_info.extension_id = UTF8ToUTF16(extension_->id()); - shortcut_info.title = UTF8ToUTF16(extension_->name()); - shortcut_info.description = UTF8ToUTF16(extension_->description()); - shortcut_info.favicon = icon_; - shortcut_info.create_on_desktop = true; - shortcut_info.create_in_applications_menu = false; - shortcut_info.create_in_quick_launch_bar = false; - web_app::CreateShortcut(browser_->profile()->GetPath(), shortcut_info, - NULL); - } - } + if (extension_ && type_ == PAGE_ACTION) { + BrowserView* browser_view = BrowserView::GetBrowserViewForNativeWindow( + browser_->window()->GetNativeHandle()); + browser_view->GetLocationBarView()->SetPreviewEnabledPageAction( + extension_->page_action(), + false); // preview_enabled } Release(); // Balanced in ctor. diff --git a/chrome/browser/ui/views/extensions/extension_installed_bubble.h b/chrome/browser/ui/views/extensions/extension_installed_bubble.h index 7ff6d82..be213b0 100644 --- a/chrome/browser/ui/views/extensions/extension_installed_bubble.h +++ b/chrome/browser/ui/views/extensions/extension_installed_bubble.h @@ -36,7 +36,6 @@ class ExtensionInstalledBubble enum BubbleType { BROWSER_ACTION, PAGE_ACTION, - EXTENSION_APP, GENERIC }; diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index 2bbf99b..8b9c39f 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -218,17 +218,17 @@ const char Extension::kWebstorePrivatePermission[] = "webstorePrivate"; // exception. const Extension::Permission Extension::kPermissions[] = { { kBackgroundPermission, 0 }, - { kBookmarkPermission, IDS_EXTENSION_PROMPT2_WARNING_BOOKMARKS }, + { kBookmarkPermission, IDS_EXTENSION_PROMPT_WARNING_BOOKMARKS }, { kContextMenusPermission, 0 }, { kCookiePermission, 0 }, { kExperimentalPermission, 0 }, - { kGeolocationPermission, IDS_EXTENSION_PROMPT2_WARNING_GEOLOCATION }, + { kGeolocationPermission, IDS_EXTENSION_PROMPT_WARNING_GEOLOCATION }, { kIdlePermission, 0 }, - { kHistoryPermission, IDS_EXTENSION_PROMPT2_WARNING_BROWSING_HISTORY }, - { kManagementPermission, IDS_EXTENSION_PROMPT2_WARNING_MANAGEMENT }, + { kHistoryPermission, IDS_EXTENSION_PROMPT_WARNING_BROWSING_HISTORY }, + { kManagementPermission, IDS_EXTENSION_PROMPT_WARNING_MANAGEMENT }, { kNotificationPermission, 0 }, { kProxyPermission, 0 }, - { kTabPermission, IDS_EXTENSION_PROMPT2_WARNING_BROWSING_HISTORY }, + { kTabPermission, IDS_EXTENSION_PROMPT_WARNING_BROWSING_HISTORY }, { kUnlimitedStoragePermission, 0 }, { kWebstorePrivatePermission, 0 }, }; @@ -273,7 +273,7 @@ std::vector Extension::GetPermissionMessages() const { std::vector messages; if (!plugins().empty()) { messages.push_back( - l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT2_WARNING_FULL_ACCESS)); + l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_FULL_ACCESS)); return messages; } @@ -331,24 +331,24 @@ std::vector Extension::GetDistinctHosts( string16 Extension::GetHostPermissionMessage() const { if (HasEffectiveAccessToAllHosts()) - return l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT2_WARNING_ALL_HOSTS); + return l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_ALL_HOSTS); std::vector hosts = GetDistinctHosts(); if (hosts.size() == 1) { - return l10n_util::GetStringFUTF16(IDS_EXTENSION_PROMPT2_WARNING_1_HOST, + return l10n_util::GetStringFUTF16(IDS_EXTENSION_PROMPT_WARNING_1_HOST, UTF8ToUTF16(hosts[0])); } else if (hosts.size() == 2) { - return l10n_util::GetStringFUTF16(IDS_EXTENSION_PROMPT2_WARNING_2_HOSTS, + return l10n_util::GetStringFUTF16(IDS_EXTENSION_PROMPT_WARNING_2_HOSTS, UTF8ToUTF16(hosts[0]), UTF8ToUTF16(hosts[1])); } else if (hosts.size() == 3) { - return l10n_util::GetStringFUTF16(IDS_EXTENSION_PROMPT2_WARNING_3_HOSTS, + return l10n_util::GetStringFUTF16(IDS_EXTENSION_PROMPT_WARNING_3_HOSTS, UTF8ToUTF16(hosts[0]), UTF8ToUTF16(hosts[1]), UTF8ToUTF16(hosts[2])); } else if (hosts.size() >= 4) { return l10n_util::GetStringFUTF16( - IDS_EXTENSION_PROMPT2_WARNING_4_OR_MORE_HOSTS, + IDS_EXTENSION_PROMPT_WARNING_4_OR_MORE_HOSTS, UTF8ToUTF16(hosts[0]), UTF8ToUTF16(hosts[1]), base::IntToString16(hosts.size() - 2)); -- cgit v1.1