Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4417)

Unified Diff: chrome/browser/ui/app_list/app_list_syncable_service_factory.cc

Issue 2055553004: arc: Support pinned apps across Arc-enabled and Arc-disabled platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chrome_mash_shelf_controller.cc update due namespace renaming Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/app_list_syncable_service_factory.cc
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc b/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc
index 9d89d8b3688a90334ad6da86867c4f3f491a5d00..7d3509bdc889ea2bfdaa8590bf50c438e5071cfc 100644
--- a/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc
+++ b/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc
@@ -25,6 +25,10 @@
namespace app_list {
+namespace {
+bool use_in_testing = false;
+}
+
// static
AppListSyncableService* AppListSyncableServiceFactory::GetForProfile(
Profile* profile) {
@@ -51,6 +55,11 @@ std::unique_ptr<KeyedService> AppListSyncableServiceFactory::BuildInstanceFor(
profile, extensions::ExtensionSystem::Get(profile)));
}
+// static
+void AppListSyncableServiceFactory::SetUseInTesting() {
+ use_in_testing = true;
+}
+
AppListSyncableServiceFactory::AppListSyncableServiceFactory()
: BrowserContextKeyedServiceFactory(
"AppListSyncableService",
@@ -97,7 +106,7 @@ bool AppListSyncableServiceFactory::ServiceIsCreatedWithBrowserContext() const {
}
bool AppListSyncableServiceFactory::ServiceIsNULLWhileTesting() const {
- return true;
+ return !use_in_testing;
}
} // namespace app_list
« no previous file with comments | « chrome/browser/ui/app_list/app_list_syncable_service_factory.h ('k') | chrome/browser/ui/ash/chrome_launcher_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698