| 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 4fcab92f7629f98cf5aa1bfb99929b3c7db91cfd..880a6d581b986f6854e01ad1fa6ce0e4ffa8e557 100644
|
| --- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
|
| +++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
|
| @@ -113,16 +113,6 @@ 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 true;
|
| -#endif
|
| -}
|
| -
|
| } // namespace
|
|
|
| namespace extensions {
|
| @@ -315,7 +305,7 @@ base::DictionaryValue* ExtensionSettingsHandler::CreateExtensionDetailValue(
|
| extension_data->SetString("optionsPageHref",
|
| OptionsPageInfo::GetOptionsPage(extension).spec());
|
| extension_data->SetBoolean("enableExtensionInfoDialog",
|
| - ShouldDisplayExtensionInfoDialog());
|
| + CanShowAppInfoDialog());
|
|
|
| // Add dependent extensions.
|
| base::ListValue* dependents_list = new base::ListValue;
|
| @@ -572,7 +562,7 @@ void ExtensionSettingsHandler::GetLocalizedValues(
|
| l10n_util::GetStringUTF16(IDS_EXTENSIONS_RELOAD_UNPACKED));
|
| source->AddString("extensionSettingsOptions",
|
| l10n_util::GetStringUTF16(IDS_EXTENSIONS_OPTIONS_LINK));
|
| - if (ShouldDisplayExtensionInfoDialog()) {
|
| + if (CanShowAppInfoDialog()) {
|
| source->AddString("extensionSettingsPermissions",
|
| l10n_util::GetStringUTF16(IDS_EXTENSIONS_INFO_LINK));
|
| } else {
|
| @@ -1241,18 +1231,15 @@ void ExtensionSettingsHandler::HandlePermissionsMessage(
|
|
|
| // Show the new-style extensions dialog when the flag is set. The flag cannot
|
| // be set on Mac platforms.
|
| - if (ShouldDisplayExtensionInfoDialog()) {
|
| + if (CanShowAppInfoDialog()) {
|
| UMA_HISTOGRAM_ENUMERATION("Apps.AppInfoDialog.Launches",
|
| AppInfoLaunchSource::FROM_EXTENSIONS_PAGE,
|
| AppInfoLaunchSource::NUM_LAUNCH_SOURCES);
|
|
|
| // Display the dialog at a size similar to the app list.
|
| - const int kAppInfoDialogWidth = 380;
|
| - const int kAppInfoDialogHeight = 490;
|
| -
|
| ShowAppInfoInNativeDialog(
|
| web_contents()->GetTopLevelNativeWindow(),
|
| - gfx::Size(kAppInfoDialogWidth, kAppInfoDialogHeight),
|
| + GetAppInfoNativeDialogSize(),
|
| Profile::FromWebUI(web_ui()), extension,
|
| base::Bind(&BrokerDelegate::AppInfoDialogClosed,
|
| base::Unretained(broker_delegate)));
|
|
|