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

Side by Side Diff: chrome/browser/ui/app_list/app_list_syncable_service.cc

Issue 556403002: cros: Enable Drive apps integration in app launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restore enable-drive-apps-in-app-list in histograms.xml Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/app_list/app_list_syncable_service.h" 5 #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/apps/drive/drive_app_provider.h" 8 #include "chrome/browser/apps/drive/drive_app_provider.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 apps_builder_->InitializeWithService(this); 265 apps_builder_->InitializeWithService(this);
266 } else { 266 } else {
267 VLOG(1) << this << ": AppListSyncableService: InitializeWithProfile."; 267 VLOG(1) << this << ": AppListSyncableService: InitializeWithProfile.";
268 apps_builder_->InitializeWithProfile(profile_, model_.get()); 268 apps_builder_->InitializeWithProfile(profile_, model_.get());
269 } 269 }
270 270
271 if (app_list::switches::IsDriveAppsInAppListEnabled()) 271 if (app_list::switches::IsDriveAppsInAppListEnabled())
272 drive_app_provider_.reset(new DriveAppProvider(profile_)); 272 drive_app_provider_.reset(new DriveAppProvider(profile_));
273 } 273 }
274 274
275 void AppListSyncableService::ResetDriveAppProviderForTest() {
276 drive_app_provider_.reset();
277 }
278
275 void AppListSyncableService::Shutdown() { 279 void AppListSyncableService::Shutdown() {
276 // DriveAppProvider touches other KeyedServices in its dtor and needs be 280 // DriveAppProvider touches other KeyedServices in its dtor and needs be
277 // released in shutdown stage. 281 // released in shutdown stage.
278 drive_app_provider_.reset(); 282 drive_app_provider_.reset();
279 } 283 }
280 284
281 void AppListSyncableService::Observe( 285 void AppListSyncableService::Observe(
282 int type, 286 int type,
283 const content::NotificationSource& source, 287 const content::NotificationSource& source,
284 const content::NotificationDetails& details) { 288 const content::NotificationDetails& details) {
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 } else { 917 } else {
914 res += " { " + item_name + " }"; 918 res += " { " + item_name + " }";
915 res += " [" + item_ordinal.ToDebugString() + "]"; 919 res += " [" + item_ordinal.ToDebugString() + "]";
916 if (!parent_id.empty()) 920 if (!parent_id.empty())
917 res += " <" + parent_id.substr(0, 8) + ">"; 921 res += " <" + parent_id.substr(0, 8) + ">";
918 } 922 }
919 return res; 923 return res;
920 } 924 }
921 925
922 } // namespace app_list 926 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_syncable_service.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698