Chromium Code Reviews| 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 9537f617691251091338c3900959b8ecf8a041bb..4dd4f6b7ac619626c7dd1d65be1089952281c907 100644 |
| --- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc |
| +++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc |
| @@ -110,16 +110,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 { |
| @@ -312,7 +302,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; |
| @@ -569,7 +559,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 { |
| @@ -1238,18 +1228,15 @@ void ExtensionSettingsHandler::HandlePermissionsMessage( |
| // Show the new-style extensions dialog when the flag is set. The flag cannot |
| // be set on Mac platforms. |
|
Dan Beam
2015/02/25 02:30:08
^ still true?
|
| - 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))); |