diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/generated_resources.grd | 7 | ||||
-rw-r--r-- | chrome/browser/dom_ui/app_launcher_handler.cc | 6 | ||||
-rw-r--r-- | chrome/browser/gtk/extension_install_prompt2_gtk.cc | 5 | ||||
-rw-r--r-- | chrome/browser/views/extensions/extension_install_prompt2.cc | 7 | ||||
-rw-r--r-- | chrome/common/extensions/extension.cc | 4 | ||||
-rw-r--r-- | chrome/common/extensions/extension.h | 3 |
6 files changed, 21 insertions, 11 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index e3ac20e..b9d6fde 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -2046,7 +2046,7 @@ each locale. --> </message> <message name="IDS_PROMPT_DANGEROUS_DOWNLOAD_EXTENSION" desc="Message shown to the user to validate the download of an extension file."> - Extensions and themes can harm your computer. Are you sure you want to continue? + Extensions, apps, and themes can harm your computer. Are you sure you want to continue? </message> <message name="IDS_SAVE_DOWNLOAD" desc="Text for the button used to validate the downloading of a dangerous download."> @@ -3338,6 +3338,9 @@ each locale. --> <message name="IDS_EXTENSION_PROMPT2_WILL_HAVE_ACCESS_TO" desc="Second line in the content area of the extension installation prompt. Note that the exact wording is important. This should mean that the extension _can_ access the listed privileges, but not necessarily that it will or needs to."> This extension can access: </message> + <message name="IDS_EXTENSION_PROMPT2_APP_WILL_HAVE_ACCESS_TO" desc="The same as IDS_EXTENSION_PROMPT2_WILL_HAVE_ACCESS_TO, but replace 'extension' with 'app'"> + This app can access: + </message> <message name="IDS_EXTENSION_PROMPT2_WARNING_FULL_ACCESS" desc="Permission string for full access to the computer and all websites."> All data on your computer and the websites you visit </message> @@ -3359,7 +3362,7 @@ each locale. --> <message name="IDS_EXTENSION_PROMPT2_WARNING_BROWSING_HISTORY" desc="Permission string for access to browsing history."> Your browsing history </message> - <message name="IDS_EXTENSION_PROMPT2_WARNING_GEOLOCATION" desc="Permissin string for access to geolocation."> + <message name="IDS_EXTENSION_PROMPT2_WARNING_GEOLOCATION" desc="Permisson string for access to geolocation."> Your physical location </message> diff --git a/chrome/browser/dom_ui/app_launcher_handler.cc b/chrome/browser/dom_ui/app_launcher_handler.cc index dbe6898..b34c82d 100644 --- a/chrome/browser/dom_ui/app_launcher_handler.cc +++ b/chrome/browser/dom_ui/app_launcher_handler.cc @@ -25,10 +25,6 @@ namespace { -bool TreatAsApp(const Extension* extension) { - return !extension->GetFullLaunchURL().is_empty(); -} - // This extracts an int from a ListValue at the given |index|. bool ExtractInt(const ListValue* list, size_t index, int* out_int) { std::string string_value; @@ -119,7 +115,7 @@ void AppLauncherHandler::HandleGetApps(const Value* value) { const ExtensionList* extensions = extensions_service_->extensions(); for (ExtensionList::const_iterator it = extensions->begin(); it != extensions->end(); ++it) { - if (TreatAsApp(*it)) { + if ((*it)->IsApp()) { DictionaryValue* app_info = new DictionaryValue(); CreateAppInfo(*it, app_info); list->Append(app_info); diff --git a/chrome/browser/gtk/extension_install_prompt2_gtk.cc b/chrome/browser/gtk/extension_install_prompt2_gtk.cc index b49dcbb..6a442f2 100644 --- a/chrome/browser/gtk/extension_install_prompt2_gtk.cc +++ b/chrome/browser/gtk/extension_install_prompt2_gtk.cc @@ -107,8 +107,11 @@ void ShowInstallPromptDialog2(GtkWindow* parent, SkBitmap* skia_icon, !show_permissions, !show_permissions, 0); if (show_permissions) { + int label = extension->IsApp() ? + IDS_EXTENSION_PROMPT2_APP_WILL_HAVE_ACCESS_TO : + IDS_EXTENSION_PROMPT2_WILL_HAVE_ACCESS_TO; GtkWidget* warning_label = gtk_label_new(l10n_util::GetStringUTF8( - IDS_EXTENSION_PROMPT2_WILL_HAVE_ACCESS_TO).c_str()); + label).c_str()); gtk_label_set_line_wrap(GTK_LABEL(warning_label), TRUE); gtk_widget_set_size_request(warning_label, kRightColumnWidth, -1); gtk_misc_set_alignment(GTK_MISC(warning_label), 0.0, 0.5); diff --git a/chrome/browser/views/extensions/extension_install_prompt2.cc b/chrome/browser/views/extensions/extension_install_prompt2.cc index 1b8387c..cb6dab9 100644 --- a/chrome/browser/views/extensions/extension_install_prompt2.cc +++ b/chrome/browser/views/extensions/extension_install_prompt2.cc @@ -139,9 +139,10 @@ InstallDialogContent2::InstallDialogContent2( right_column_width_ = kNoPermissionsRightColumnWidth; } else { right_column_width_ = kPermissionBoxWidth; - - will_have_access_to_ = new views::Label( - l10n_util::GetString(IDS_EXTENSION_PROMPT2_WILL_HAVE_ACCESS_TO)); + int label = extension->IsApp() ? + 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_->SetMultiLine(true); will_have_access_to_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); AddChildView(will_have_access_to_); diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index f68445e..8736c79 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -1539,6 +1539,10 @@ std::set<FilePath> Extension::GetBrowserImages() { return image_paths; } +bool Extension::IsApp() const { + return !GetFullLaunchURL().is_empty(); +} + GURL Extension::GetFullLaunchURL() const { if (!launch_local_path_.empty()) { return extension_url_.Resolve(launch_local_path_); diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h index 67eee26..62bcfc7 100644 --- a/chrome/common/extensions/extension.h +++ b/chrome/common/extensions/extension.h @@ -329,6 +329,9 @@ class Extension { const std::string omnibox_keyword() const { return omnibox_keyword_; } + // Is this extension an App? + bool IsApp() const; + bool web_content_enabled() const { return web_content_enabled_; } const ExtensionExtent& web_extent() const { return web_extent_; } |