Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Unified Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 664933006: Enabled the App Info dialog on the Extensions page by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Un-merged badly combined rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | extensions/common/switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/extensions/extension_settings_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index 32cc59d81039ebc08ce3111841db6684b5cf1b09..bc97cf2029e52a3cee2abf3f96ac5031d49c923b 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -108,10 +108,23 @@ using content::RenderViewHost;
using content::WebContents;
namespace {
+
const char kAppsDeveloperToolsExtensionId[] =
"ohmmkhmmmpcnpikjeljgnaoabkaalbgc";
+
+// Returns true if the extensions page should display the new-style extension
+// info dialog. If false, display the old permissions dialog.
+bool ShouldDisplayExtensionInfoDialog() {
+#if defined(OS_MACOSX)
+ return false;
+#else
+ return !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ extensions::switches::kDisableExtensionInfoDialog);
+#endif
}
+} // namespace
+
namespace extensions {
ExtensionPage::ExtensionPage(const GURL& url,
@@ -290,8 +303,7 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
extension_data->SetString("optionsPageHref",
OptionsPageInfo::GetOptionsPage(extension).spec());
extension_data->SetBoolean("enableExtensionInfoDialog",
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableExtensionInfoDialog));
+ ShouldDisplayExtensionInfoDialog());
// Add dependent extensions.
base::ListValue* dependents_list = new base::ListValue;
@@ -540,8 +552,7 @@ void ExtensionSettingsHandler::GetLocalizedValues(
l10n_util::GetStringUTF16(IDS_EXTENSIONS_RELOAD_UNPACKED));
source->AddString("extensionSettingsOptions",
l10n_util::GetStringUTF16(IDS_EXTENSIONS_OPTIONS_LINK));
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableExtensionInfoDialog)) {
+ if (ShouldDisplayExtensionInfoDialog()) {
source->AddString("extensionSettingsPermissions",
l10n_util::GetStringUTF16(IDS_EXTENSIONS_INFO_LINK));
} else {
@@ -1202,8 +1213,7 @@ void ExtensionSettingsHandler::HandlePermissionsMessage(
// Show the new-style extensions dialog when the flag is set. The flag cannot
// be set on Mac platforms.
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableExtensionInfoDialog)) {
+ if (ShouldDisplayExtensionInfoDialog()) {
UMA_HISTOGRAM_ENUMERATION("Apps.AppInfoDialog.Launches",
AppInfoLaunchSource::FROM_EXTENSIONS_PAGE,
AppInfoLaunchSource::NUM_LAUNCH_SOURCES);
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | extensions/common/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698