diff options
Diffstat (limited to 'chrome/browser/ui/webui/ntp')
-rw-r--r-- | chrome/browser/ui/webui/ntp/new_tab_page_handler.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/webui/ntp/new_tab_ui.cc | 6 | ||||
-rw-r--r-- | chrome/browser/ui/webui/ntp/ntp_resource_cache.cc | 4 |
3 files changed, 8 insertions, 6 deletions
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; |