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

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: rebased, comments addressed, removed item_pinned_by_policy 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..c587ec1334c6c39bfaec473e612150d6167fa0ee 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,15 @@
namespace app_list {
+namespace {
+bool used_in_testing = false;
xiyuan 2016/06/14 21:42:50 nit: used_in_testing -> use_in_testing to be consi
khmel 2016/06/15 17:01:19 Done.
+}
+
+// static
+void AppListSyncableServiceFactory::SetUseInTesting() {
xiyuan 2016/06/14 21:42:50 nit: either move this down after BuildInstanceFor,
khmel 2016/06/15 17:01:19 Done.
+ used_in_testing = true;
+}
+
// static
AppListSyncableService* AppListSyncableServiceFactory::GetForProfile(
Profile* profile) {
@@ -97,7 +106,7 @@ bool AppListSyncableServiceFactory::ServiceIsCreatedWithBrowserContext() const {
}
bool AppListSyncableServiceFactory::ServiceIsNULLWhileTesting() const {
- return true;
+ return !used_in_testing;
}
} // namespace app_list

Powered by Google App Engine
This is Rietveld 408576698