| 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 14fbb1f02d6dd79a0cfbe1a60187ad04c3e46153..e40309c6326411c98cad30de75b438375a6dbd7c 100644
|
| --- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
|
| +++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
|
| @@ -52,7 +52,9 @@
|
| #include "chrome/browser/ui/webui/extensions/extension_basic_info.h"
|
| #include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
|
| #include "chrome/common/chrome_switches.h"
|
| +#include "chrome/common/chrome_version_info.h"
|
| #include "chrome/common/extensions/extension_constants.h"
|
| +#include "chrome/common/extensions/features/feature_channel.h"
|
| #include "chrome/common/extensions/manifest_url_handler.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "chrome/common/url_constants.h"
|
| @@ -81,7 +83,6 @@
|
| #include "extensions/common/extension.h"
|
| #include "extensions/common/extension_icon_set.h"
|
| #include "extensions/common/extension_set.h"
|
| -#include "extensions/common/feature_switch.h"
|
| #include "extensions/common/manifest.h"
|
| #include "extensions/common/manifest_handlers/background_info.h"
|
| #include "extensions/common/manifest_handlers/incognito_info.h"
|
| @@ -97,6 +98,11 @@ using base::ListValue;
|
| using content::RenderViewHost;
|
| using content::WebContents;
|
|
|
| +namespace {
|
| +const char kAppsDeveloperToolsExtensionId[] =
|
| + "ohmmkhmmmpcnpikjeljgnaoabkaalbgc";
|
| +}
|
| +
|
| namespace extensions {
|
|
|
| ExtensionPage::ExtensionPage(const GURL& url,
|
| @@ -474,6 +480,17 @@ void ExtensionSettingsHandler::GetLocalizedValues(
|
| l10n_util::GetStringUTF16(IDS_EXTENSIONS_COMMANDS_CONFIGURE));
|
| source->AddString("extensionSettingsUpdateButton",
|
| l10n_util::GetStringUTF16(IDS_EXTENSIONS_UPDATE_BUTTON));
|
| + source->AddString(
|
| + "extensionSettingsAppsDevToolsPromoText",
|
| + l10n_util::GetStringUTF16(IDS_EXTENSIONS_APPS_DEV_TOOLS_PROMO_TEXT));
|
| + source->AddString(
|
| + "extensionSettingsAppsDevToolsLinkText",
|
| + l10n_util::GetStringUTF16(IDS_EXTENSIONS_APPS_DEV_TOOLS_LINK_TEXT));
|
| + source->AddString(
|
| + "extensionSettingsAppsDevToolsUrl",
|
| + base::ASCIIToUTF16(google_util::AppendGoogleLocaleParam(
|
| + GURL(extension_urls::GetWebstoreItemDetailURLPrefix() +
|
| + kAppsDeveloperToolsExtensionId)).spec()));
|
| source->AddString("extensionSettingsCrashMessage",
|
| l10n_util::GetStringUTF16(IDS_EXTENSIONS_CRASHED_EXTENSION));
|
| source->AddString("extensionSettingsInDevelopment",
|
| @@ -824,6 +841,14 @@ void ExtensionSettingsHandler::HandleRequestExtensionsData(
|
| results.SetBoolean("profileIsManaged", is_managed);
|
| results.SetBoolean("developerMode", developer_mode);
|
|
|
| + // Promote the Apps Developer Tools if they're not installed.
|
| + bool promote_apps_dev_tools =
|
| + GetCurrentChannel() <= chrome::VersionInfo::CHANNEL_DEV &&
|
| + !ExtensionRegistry::Get(Profile::FromWebUI(web_ui()))->
|
| + GetExtensionById(kAppsDeveloperToolsExtensionId,
|
| + ExtensionRegistry::EVERYTHING);
|
| + results.SetBoolean("promoteAppsDevTools", promote_apps_dev_tools);
|
| +
|
| bool load_unpacked_disabled =
|
| ExtensionPrefs::Get(profile)->ExtensionsBlacklistedByDefault();
|
| results.SetBoolean("loadUnpackedDisabled", load_unpacked_disabled);
|
|
|