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

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

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 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 "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "chrome/browser/apps/drive/drive_app_provider.h" 9 #include "chrome/browser/apps/drive/drive_app_provider.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 void AppListSyncableService::BuildModel() { 254 void AppListSyncableService::BuildModel() {
255 // TODO(calamity): make this a DCHECK after a dev channel release. 255 // TODO(calamity): make this a DCHECK after a dev channel release.
256 CHECK(extension_system_->extension_service() && 256 CHECK(extension_system_->extension_service() &&
257 extension_system_->extension_service()->is_ready()); 257 extension_system_->extension_service()->is_ready());
258 // For now, use the AppListControllerDelegate associated with the native 258 // For now, use the AppListControllerDelegate associated with the native
259 // desktop. TODO(stevenjb): Remove ExtensionAppModelBuilder controller 259 // desktop. TODO(stevenjb): Remove ExtensionAppModelBuilder controller
260 // dependency and move the dependent methods from AppListControllerDelegate 260 // dependency and move the dependent methods from AppListControllerDelegate
261 // to an extension service delegate associated with this class. 261 // to an extension service delegate associated with this class.
262 AppListControllerDelegate* controller = NULL; 262 AppListControllerDelegate* controller = NULL;
263 AppListService* service = 263 AppListService* service = AppListService::Get(ui::HOST_DESKTOP_TYPE_NATIVE);
264 AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE);
265 if (service) 264 if (service)
266 controller = service->GetControllerDelegate(); 265 controller = service->GetControllerDelegate();
267 apps_builder_.reset(new ExtensionAppModelBuilder(controller)); 266 apps_builder_.reset(new ExtensionAppModelBuilder(controller));
268 DCHECK(profile_); 267 DCHECK(profile_);
269 if (app_list::switches::IsAppListSyncEnabled()) { 268 if (app_list::switches::IsAppListSyncEnabled()) {
270 VLOG(1) << this << ": AppListSyncableService: InitializeWithService."; 269 VLOG(1) << this << ": AppListSyncableService: InitializeWithService.";
271 SyncStarted(); 270 SyncStarted();
272 apps_builder_->InitializeWithService(this, model_.get()); 271 apps_builder_->InitializeWithService(this, model_.get());
273 } else { 272 } else {
274 VLOG(1) << this << ": AppListSyncableService: InitializeWithProfile."; 273 VLOG(1) << this << ": AppListSyncableService: InitializeWithProfile.";
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 } else { 994 } else {
996 res += " { " + item_name + " }"; 995 res += " { " + item_name + " }";
997 res += " [" + item_ordinal.ToDebugString() + "]"; 996 res += " [" + item_ordinal.ToDebugString() + "]";
998 if (!parent_id.empty()) 997 if (!parent_id.empty())
999 res += " <" + parent_id.substr(0, 8) + ">"; 998 res += " <" + parent_id.substr(0, 8) + ">";
1000 } 999 }
1001 return res; 1000 return res;
1002 } 1001 }
1003 1002
1004 } // namespace app_list 1003 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698