diff options
22 files changed, 168 insertions, 94 deletions
@@ -2,9 +2,13 @@ include_rules = [ "+base", "+content", # Temporary allowed includes. - # TODO(benwells): remove these. + # TODO(benwells): remove these (http://crbug.com/159366) + "+chrome/browser/browser_process.h", "+chrome/browser/extensions", + "+chrome/browser/prefs", "+chrome/browser/profiles", "+chrome/common/chrome_notification_types.h", + "+chrome/common/chrome_switches.h", "+chrome/common/extensions", + "+chrome/installer", ] diff --git a/chrome/browser/extensions/app_launcher.cc b/apps/app_launcher.cc index 5ca6fbf..73011bc 100644 --- a/chrome/browser/extensions/app_launcher.cc +++ b/apps/app_launcher.cc @@ -1,16 +1,16 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/extensions/app_launcher.h" +#include "apps/app_launcher.h" +#include "apps/pref_names.h" #include "base/command_line.h" #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service.h" #include "base/threading/sequenced_worker_pool.h" #include "chrome/browser/browser_process.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/pref_names.h" #include "content/public/browser/browser_thread.h" #if defined(OS_WIN) @@ -18,30 +18,10 @@ #include "chrome/installer/util/browser_distribution.h" #endif -namespace extensions { +namespace apps { namespace { -#if defined(OS_WIN) -void UpdatePrefAndCallCallbackOnUI( - bool result, - const OnAppLauncherEnabledCompleted& completion_callback) { - PrefService* prefs = g_browser_process->local_state(); - prefs->SetBoolean(prefs::kAppLauncherIsEnabled, result); - completion_callback.Run(result); -} - -void IsAppLauncherInstalledOnBlockingPool( - const OnAppLauncherEnabledCompleted& completion_callback) { - DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread()); - bool result = chrome_launcher_support::IsAppLauncherPresent(); - content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, - base::Bind(UpdatePrefAndCallCallbackOnUI, result, completion_callback)); -} -#endif - -} // namespace - enum AppLauncherState { APP_LAUNCHER_UNKNOWN, APP_LAUNCHER_ENABLED, @@ -66,7 +46,31 @@ AppLauncherState SynchronousAppLauncherChecks() { #endif } -void UpdateIsAppLauncherEnabled( +#if defined(OS_WIN) +void UpdatePrefAndCallCallbackOnUI( + bool result, + const OnAppLauncherEnabledCompleted& completion_callback) { + PrefService* prefs = g_browser_process->local_state(); + prefs->SetBoolean(prefs::kAppLauncherIsEnabled, result); + completion_callback.Run(result); +} + +void IsAppLauncherInstalledOnBlockingPool( + const OnAppLauncherEnabledCompleted& completion_callback) { + DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread()); + bool result = chrome_launcher_support::IsAppLauncherPresent(); + content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE, + base::Bind(UpdatePrefAndCallCallbackOnUI, result, completion_callback)); +} +#endif + +} // namespace + +bool MaybeIsAppLauncherEnabled() { + return SynchronousAppLauncherChecks() == APP_LAUNCHER_ENABLED; +} + +void GetIsAppLauncherEnabled( const OnAppLauncherEnabledCompleted& completion_callback) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); @@ -92,30 +96,12 @@ void UpdateIsAppLauncherEnabled( #endif } -bool IsAppLauncherEnabled() { +bool WasAppLauncherEnabled() { PrefService* prefs = g_browser_process->local_state(); - // In some tests, the prefs aren't initialised, but the NTP still needs to - // work. + // In some tests, the prefs aren't initialised. if (!prefs) return SynchronousAppLauncherChecks() == APP_LAUNCHER_ENABLED; return prefs->GetBoolean(prefs::kAppLauncherIsEnabled); } -namespace app_launcher { - -void RegisterPrefs(PrefRegistrySimple* registry) { - // If it is impossible to synchronously determine whether the app launcher is - // enabled, assume it is disabled. Anything that needs to know the absolute - // truth should call UpdateIsAppLauncherEnabled(). - // - // This pref is just a cache of the value from the registry from last time - // Chrome ran. To avoid having the NTP block on a registry check, it guesses - // that the value hasn't changed since last time it was checked, using this - // preference. - bool is_enabled = SynchronousAppLauncherChecks() == APP_LAUNCHER_ENABLED; - registry->RegisterBooleanPref(prefs::kAppLauncherIsEnabled, is_enabled); -} - -} // namespace app_launcher - -} // namespace extensions +} // namespace apps diff --git a/chrome/browser/extensions/app_launcher.h b/apps/app_launcher.h index 5d07673..b6bbed3 100644 --- a/chrome/browser/extensions/app_launcher.h +++ b/apps/app_launcher.h @@ -1,34 +1,38 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_EXTENSIONS_APP_LAUNCHER_H_ -#define CHROME_BROWSER_EXTENSIONS_APP_LAUNCHER_H_ +#ifndef CHROME_APPS_APP_LAUNCHER_H_ +#define CHROME_APPS_APP_LAUNCHER_H_ #include "base/basictypes.h" #include "base/callback_forward.h" class PrefRegistrySimple; -namespace extensions { +namespace apps { // Called on the UI thread after determining if the launcher is enabled. A // boolean flag is passed, which is true if the app launcher is enabled. typedef base::Callback<void(bool)> OnAppLauncherEnabledCompleted; +// A synchronous check to determine if the app launcher is enabled. If the +// registry needs to be determined to find an accurate answer, this function +// will NOT do so; instead if will default to false (the app launcher is not +// enabled). +// This function does not use the cached preference of whether the launcher +// was enabled or not. +bool MaybeIsAppLauncherEnabled(); + // Determine whether the app launcher is enabled or not. This may involve a trip // to a blocking thread. |completion_callback| is called when an answer is // ready. This needs to be called on the UI thread. -void UpdateIsAppLauncherEnabled( +void GetIsAppLauncherEnabled( const OnAppLauncherEnabledCompleted& completion_callback); -// returns value of pref. 'was app launcher enabled last time i checked'. -bool IsAppLauncherEnabled(); - -namespace app_launcher { -void RegisterPrefs(PrefRegistrySimple* registry); -} +// Returns whether the app launcher was enabled the last time it was checked. +bool WasAppLauncherEnabled(); } // namespace extensions -#endif // CHROME_BROWSER_EXTENSIONS_APP_LAUNCHER_H_ +#endif // CHROME_APPS_APP_LAUNCHER_H_ diff --git a/apps/apps.gypi b/apps/apps.gypi index 43f9cc5..257195d 100644 --- a/apps/apps.gypi +++ b/apps/apps.gypi @@ -22,10 +22,16 @@ '<(INTERMEDIATE_DIR)', ], 'sources': [ + 'app_launcher.cc', + 'app_launcher.h', 'app_restore_service.cc', 'app_restore_service.h', 'app_restore_service_factory.cc', 'app_restore_service_factory.h', + 'pref_names.cc', + 'pref_names.h', + 'prefs.cc', + 'prefs.h', ], 'conditions': [ ['enable_extensions==0', { diff --git a/apps/pref_names.cc b/apps/pref_names.cc new file mode 100644 index 0000000..15a33f9 --- /dev/null +++ b/apps/pref_names.cc @@ -0,0 +1,17 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "apps/pref_names.h" + +namespace apps { + +namespace prefs { + +// Local state caching knowledge of whether the app launcher is installed. +const char kAppLauncherIsEnabled[] = + "apps.app_launcher.should_show_apps_page"; + +} // namespace prefs + +} // namespace apps diff --git a/apps/pref_names.h b/apps/pref_names.h new file mode 100644 index 0000000..1cca82f --- /dev/null +++ b/apps/pref_names.h @@ -0,0 +1,18 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef APPS_PREF_NAMES_H_ +#define APPS_PREF_NAMES_H_ + +namespace apps { + +namespace prefs { + +extern const char kAppLauncherIsEnabled[]; + +} // namespace prefs + +} // namespace apps + +#endif // APPS_PREF_NAMES_H_ diff --git a/apps/prefs.cc b/apps/prefs.cc new file mode 100644 index 0000000..b883fbb --- /dev/null +++ b/apps/prefs.cc @@ -0,0 +1,25 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "apps/prefs.h" + +#include "apps/app_launcher.h" +#include "apps/pref_names.h" +#include "base/prefs/pref_registry_simple.h" + +namespace apps { + +void RegisterPrefs(PrefRegistrySimple* registry) { + // This pref is a cache of the value from the registry the last time it was + // checked. + // + // During the pref initialization, if it is impossible to synchronously + // determine whether the app launcher is enabled, assume it is disabled. + // Anything that needs to know the absolute truth should call + // GetIsAppLauncherEnabled(). + registry->RegisterBooleanPref(prefs::kAppLauncherIsEnabled, + MaybeIsAppLauncherEnabled()); +} + +} // namespace apps diff --git a/apps/prefs.h b/apps/prefs.h new file mode 100644 index 0000000..3734860 --- /dev/null +++ b/apps/prefs.h @@ -0,0 +1,17 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef APPS_PREFS_H_ +#define APPS_PREFS_H_ + +class PrefRegistrySimple; + +namespace apps { + +// Register preferences for the apps system. +void RegisterPrefs(PrefRegistrySimple* registry); + +} // namespace apps + +#endif // APPS_PREFS_H_ diff --git a/chrome/browser/extensions/api/DEPS b/chrome/browser/extensions/api/DEPS new file mode 100644 index 0000000..6d699a6 --- /dev/null +++ b/chrome/browser/extensions/api/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+apps", +] diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc index 87b98ae..e1069be 100644 --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.cc @@ -4,6 +4,7 @@ #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h" +#include "apps/app_launcher.h" #include "base/bind_helpers.h" #include "base/command_line.h" #include "base/lazy_instance.h" @@ -14,7 +15,6 @@ #include "base/values.h" #include "chrome/browser/about_flags.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/extensions/app_launcher.h" #include "chrome/browser/extensions/crx_installer.h" #include "chrome/browser/extensions/extension_function_dispatcher.h" #include "chrome/browser/extensions/extension_prefs.h" @@ -458,7 +458,7 @@ bool CompleteInstallFunction::RunImpl() { } void CompleteInstallFunction::AfterMaybeInstallAppLauncher(bool ok) { - UpdateIsAppLauncherEnabled(base::Bind( + apps::GetIsAppLauncherEnabled(base::Bind( &CompleteInstallFunction::OnGetAppLauncherEnabled, this, approval_->extension_id)); } @@ -580,7 +580,7 @@ void GetWebGLStatusFunction::OnFeatureCheck(bool feature_allowed) { } bool GetIsLauncherEnabledFunction::RunImpl() { - UpdateIsAppLauncherEnabled(base::Bind( + apps::GetIsAppLauncherEnabled(base::Bind( &GetIsLauncherEnabledFunction::OnIsLauncherCheckCompleted, this)); return true; } diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index 2f708c7..9e1c2c1 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc @@ -4,6 +4,7 @@ #include "chrome/browser/prefs/browser_prefs.h" +#include "apps/prefs.h" #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service.h" #include "chrome/browser/about_flags.h" @@ -21,7 +22,6 @@ #include "chrome/browser/download/download_prefs.h" #include "chrome/browser/extensions/api/commands/command_service.h" #include "chrome/browser/extensions/api/tabs/tabs_api.h" -#include "chrome/browser/extensions/app_launcher.h" #include "chrome/browser/extensions/component_loader.h" #include "chrome/browser/extensions/extension_prefs.h" #include "chrome/browser/extensions/extension_web_ui.h" @@ -159,10 +159,10 @@ void RegisterLocalState(PrefService* local_state, registry->RegisterIntegerPref(prefs::kMultipleProfilePrefMigration, 0); // Please keep this list alphabetized. + apps::RegisterPrefs(registry); browser_shutdown::RegisterPrefs(registry); BrowserProcessImpl::RegisterPrefs(registry); chrome::RegisterScreenshotPrefs(registry); - extensions::app_launcher::RegisterPrefs(registry); ExternalProtocolHandler::RegisterPrefs(registry); FlagsUI::RegisterPrefs(registry); geolocation::RegisterPrefs(registry); diff --git a/chrome/browser/extensions/extension_install_ui_android.cc b/chrome/browser/ui/android/extensions/extension_install_ui_android.cc index 22f0be1..af476e0 100644 --- a/chrome/browser/extensions/extension_install_ui_android.cc +++ b/chrome/browser/ui/android/extensions/extension_install_ui_android.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/extensions/extension_install_ui_android.h" +#include "chrome/browser/ui/android/extensions/extension_install_ui_android.h" #include "base/logging.h" #include "chrome/browser/extensions/extension_install_prompt.h" diff --git a/chrome/browser/extensions/extension_install_ui_android.h b/chrome/browser/ui/android/extensions/extension_install_ui_android.h index 84bfa24..96d79dd4 100644 --- a/chrome/browser/extensions/extension_install_ui_android.h +++ b/chrome/browser/ui/android/extensions/extension_install_ui_android.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_ANDROID_H_ -#define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_ANDROID_H_ +#ifndef CHROME_BROWSER_UI_ANDROID_EXTENSIONS_EXTENSION_INSTALL_UI_ANDROID_H_ +#define CHROME_BROWSER_UI_ANDROID_EXTENSIONS_EXTENSION_INSTALL_UI_ANDROID_H_ #include "chrome/browser/extensions/extension_install_ui.h" @@ -23,4 +23,4 @@ class ExtensionInstallUIAndroid : public ExtensionInstallUI { DISALLOW_COPY_AND_ASSIGN(ExtensionInstallUIAndroid); }; -#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_ANDROID_H_ +#endif // CHROME_BROWSER_UI_ANDROID_EXTENSIONS_EXTENSION_INSTALL_UI_ANDROID_H_ diff --git a/chrome/browser/extensions/extension_install_ui_default.cc b/chrome/browser/ui/extensions/extension_install_ui_default.cc index 5fb4c15..e8bd56f 100644 --- a/chrome/browser/extensions/extension_install_ui_default.cc +++ b/chrome/browser/ui/extensions/extension_install_ui_default.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/extensions/extension_install_ui_default.h" +#include "chrome/browser/ui/extensions/extension_install_ui_default.h" +#include "apps/app_launcher.h" #include "base/bind.h" #include "base/command_line.h" #include "base/utf_string_conversions.h" #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" #include "chrome/browser/api/infobars/infobar_service.h" -#include "chrome/browser/extensions/app_launcher.h" #include "chrome/browser/extensions/extension_install_prompt.h" #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" #include "chrome/browser/profiles/profile.h" @@ -188,7 +188,7 @@ void ExtensionInstallUIDefault::OnInstallSuccess(const Extension* extension, cmdline->HasSwitch(switches::kAppsNewInstallBubble)); #endif - extensions::UpdateIsAppLauncherEnabled( + apps::GetIsAppLauncherEnabled( base::Bind(&OnAppLauncherEnabledCompleted, extension, browser, icon, use_bubble)); return; diff --git a/chrome/browser/extensions/extension_install_ui_default.h b/chrome/browser/ui/extensions/extension_install_ui_default.h index 5c719b9..a465d5d 100644 --- a/chrome/browser/extensions/extension_install_ui_default.h +++ b/chrome/browser/ui/extensions/extension_install_ui_default.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ -#define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ +#ifndef CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ +#define CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ #include "chrome/browser/extensions/extension_install_ui.h" @@ -42,4 +42,4 @@ class ExtensionInstallUIDefault : public ExtensionInstallUI { DISALLOW_IMPLICIT_CONSTRUCTORS(ExtensionInstallUIDefault); }; -#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ +#endif // CHROME_BROWSER_UI_EXTENSIONS_EXTENSION_INSTALL_UI_DEFAULT_H_ diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc index 31f18cb..78973b6 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc +++ b/chrome/browser/ui/webui/ntp/new_tab_page_handler.cc @@ -4,12 +4,12 @@ #include "chrome/browser/ui/webui/ntp/new_tab_page_handler.h" +#include "apps/app_launcher.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/memory/scoped_ptr.h" #include "base/metrics/histogram.h" #include "base/prefs/pref_service.h" -#include "chrome/browser/extensions/app_launcher.h" #include "chrome/browser/prefs/pref_registry_syncable.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sync/profile_sync_service.h" @@ -173,7 +173,7 @@ void NewTabPageHandler::HandleLogTimeToClick(const ListValue* args) { } void NewTabPageHandler::HandleGetShouldShowApps(const ListValue* args) { - extensions::UpdateIsAppLauncherEnabled( + apps::GetIsAppLauncherEnabled( base::Bind(&NewTabPageHandler::GotIsAppLauncherEnabled, AsWeakPtr())); } diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.cc b/chrome/browser/ui/webui/ntp/new_tab_ui.cc index 0808c47..968be06 100644 --- a/chrome/browser/ui/webui/ntp/new_tab_ui.cc +++ b/chrome/browser/ui/webui/ntp/new_tab_ui.cc @@ -8,6 +8,7 @@ #include <set> +#include "apps/app_launcher.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/command_line.h" @@ -20,7 +21,6 @@ #include "base/threading/thread.h" #include "base/utf_string_conversions.h" #include "chrome/browser/defaults.h" -#include "chrome/browser/extensions/app_launcher.h" #include "chrome/browser/prefs/pref_registry_syncable.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_types.h" @@ -300,7 +300,9 @@ bool NewTabUI::ShouldShowApps() { // Android does not have apps. return false; #else - return !extensions::IsAppLauncherEnabled(); + // This needs to be synchronous, so we use the value the last time it + // was checked. + return !apps::WasAppLauncherEnabled(); #endif } diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc index 3718bf3..983adde 100644 --- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc +++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc @@ -7,6 +7,7 @@ #include <string> #include <vector> +#include "apps/app_launcher.h" #include "base/command_line.h" #include "base/file_util.h" #include "base/memory/ref_counted_memory.h" @@ -17,7 +18,6 @@ #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/extensions/app_launcher.h" #include "chrome/browser/first_run/first_run.h" #include "chrome/browser/google/google_util.h" #include "chrome/browser/policy/browser_policy_connector.h" @@ -194,7 +194,7 @@ bool NTPResourceCache::NewTabCacheNeedsRefresh() { return true; } #endif - bool should_show_apps_page = !extensions::IsAppLauncherEnabled(); + bool should_show_apps_page = !apps::WasAppLauncherEnabled(); if (should_show_apps_page != should_show_apps_page_) { should_show_apps_page_ = should_show_apps_page; return true; diff --git a/chrome/chrome_browser_extensions.gypi b/chrome/chrome_browser_extensions.gypi index 05a036e..9d66d25 100644 --- a/chrome/chrome_browser_extensions.gypi +++ b/chrome/chrome_browser_extensions.gypi @@ -449,8 +449,6 @@ 'browser/extensions/api/webview/webview_api.h', 'browser/extensions/app_host_installer_win.cc', 'browser/extensions/app_host_installer_win.h', - 'browser/extensions/app_launcher.cc', - 'browser/extensions/app_launcher.h', 'browser/extensions/app_notification.cc', 'browser/extensions/app_notification.h', 'browser/extensions/app_notification_manager.cc', @@ -552,8 +550,6 @@ 'browser/extensions/extension_install_prompt.h', 'browser/extensions/extension_install_ui.cc', 'browser/extensions/extension_install_ui.h', - 'browser/extensions/extension_install_ui_default.cc', - 'browser/extensions/extension_install_ui_default.h', 'browser/extensions/extension_keybinding_registry.cc', 'browser/extensions/extension_keybinding_registry.h', 'browser/extensions/extension_pref_store.cc', @@ -900,8 +896,6 @@ 'sources': [ 'browser/extensions/extension_error_ui_android.cc', 'browser/extensions/extension_error_ui_android.h', - 'browser/extensions/extension_install_ui_android.cc', - 'browser/extensions/extension_install_ui_android.h', 'browser/extensions/extension_tab_util_android.cc', ], 'sources!': [ @@ -909,8 +903,6 @@ 'browser/extensions/app_notify_channel_ui_impl.h', 'browser/extensions/extension_error_ui_default.cc', 'browser/extensions/extension_error_ui_default.h', - 'browser/extensions/extension_install_ui_default.cc', - 'browser/extensions/extension_install_ui_default.h', 'browser/extensions/extension_tab_util.cc', 'browser/extensions/platform_app_launcher.cc', 'browser/extensions/platform_app_launcher.h', diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index 7930fc1..95e0a86 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi @@ -74,6 +74,8 @@ 'browser/ui/android/chrome_http_auth_handler.cc', 'browser/ui/android/chrome_http_auth_handler.h', 'browser/ui/android/extensions/extension_install_dialog_android.cc', + 'browser/ui/android/extensions/extension_install_ui_android.cc', + 'browser/ui/android/extensions/extension_install_ui_android.h', 'browser/ui/android/extensions/extension_view_android.cc', 'browser/ui/android/extensions/extension_view_android.h', 'browser/ui/android/external_protocol_dialog_android.cc', @@ -842,6 +844,8 @@ 'browser/ui/crypto_module_password_dialog_openssl.cc', 'browser/ui/extensions/application_launch.cc', 'browser/ui/extensions/application_launch.h', + 'browser/ui/extensions/extension_install_ui_default.cc', + 'browser/ui/extensions/extension_install_ui_default.h', 'browser/ui/extensions/extension_enable_flow.cc', 'browser/ui/extensions/extension_enable_flow.h', 'browser/ui/extensions/extension_enable_flow_delegate.h', @@ -2556,6 +2560,8 @@ 'browser/ui/browser_tabstrip.h', 'browser/ui/chrome_pages.cc', 'browser/ui/chrome_pages.h', + 'browser/ui/extensions/extension_install_ui_default.cc', + 'browser/ui/extensions/extension_install_ui_default.h', 'browser/ui/ntp_background_util.cc', 'browser/ui/ntp_background_util.h', 'browser/ui/sad_tab_helper.cc', diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index 3598c92..2cb24e5 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc @@ -1618,10 +1618,6 @@ const char kExtensionInstallForceList[] = "extensions.install.forcelist"; const char kExtensionStorageGarbageCollect[] = "extensions.storage.garbagecollect"; -// Local state caching knowledge of whether the app launcher is installed. -const char kAppLauncherIsEnabled[] = - "extensions.app_launcher.should_show_apps_page"; - // Keeps track of which sessions are collapsed in the Other Devices menu. const char kNtpCollapsedForeignSessions[] = "ntp.collapsed_foreign_sessions"; diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index 4babefb..9a80028 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h @@ -569,8 +569,6 @@ extern const char kExtensionInstallDenyList[]; extern const char kExtensionInstallForceList[]; extern const char kExtensionStorageGarbageCollect[]; -extern const char kAppLauncherIsEnabled[]; - extern const char kNtpTipsResourceServer[]; extern const char kNtpCollapsedForeignSessions[]; |