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

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

Issue 2668153002: Revert of Move more utility functions to arc_util. (Closed)
Patch Set: Created 3 years, 10 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 <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 23 matching lines...) Expand all
34 #include "extensions/common/one_shot_event.h" 34 #include "extensions/common/one_shot_event.h"
35 #include "ui/app_list/app_list_folder_item.h" 35 #include "ui/app_list/app_list_folder_item.h"
36 #include "ui/app_list/app_list_item.h" 36 #include "ui/app_list/app_list_item.h"
37 #include "ui/app_list/app_list_model.h" 37 #include "ui/app_list/app_list_model.h"
38 #include "ui/app_list/app_list_model_observer.h" 38 #include "ui/app_list/app_list_model_observer.h"
39 #include "ui/app_list/app_list_switches.h" 39 #include "ui/app_list/app_list_switches.h"
40 #include "ui/base/l10n/l10n_util.h" 40 #include "ui/base/l10n/l10n_util.h"
41 41
42 #if defined(OS_CHROMEOS) 42 #if defined(OS_CHROMEOS)
43 #include "chrome/browser/chromeos/arc/arc_session_manager.h" 43 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
44 #include "chrome/browser/chromeos/arc/arc_util.h"
45 #include "chrome/browser/chromeos/file_manager/app_id.h" 44 #include "chrome/browser/chromeos/file_manager/app_id.h"
46 #include "chrome/browser/chromeos/genius_app/app_id.h" 45 #include "chrome/browser/chromeos/genius_app/app_id.h"
47 #include "chrome/browser/ui/app_list/arc/arc_app_item.h" 46 #include "chrome/browser/ui/app_list/arc/arc_app_item.h"
48 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" 47 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
49 #include "chrome/browser/ui/app_list/arc/arc_app_model_builder.h" 48 #include "chrome/browser/ui/app_list/arc/arc_app_model_builder.h"
50 #endif 49 #endif
51 50
52 using syncer::SyncChange; 51 using syncer::SyncChange;
53 52
54 namespace app_list { 53 namespace app_list {
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 InitFromLocalStorage(); 388 InitFromLocalStorage();
390 389
391 // TODO(calamity): make this a DCHECK after a dev channel release. 390 // TODO(calamity): make this a DCHECK after a dev channel release.
392 CHECK(IsExtensionServiceReady()); 391 CHECK(IsExtensionServiceReady());
393 AppListControllerDelegate* controller = NULL; 392 AppListControllerDelegate* controller = NULL;
394 AppListService* service = AppListService::Get(); 393 AppListService* service = AppListService::Get();
395 if (service) 394 if (service)
396 controller = service->GetControllerDelegate(); 395 controller = service->GetControllerDelegate();
397 apps_builder_.reset(new ExtensionAppModelBuilder(controller)); 396 apps_builder_.reset(new ExtensionAppModelBuilder(controller));
398 #if defined(OS_CHROMEOS) 397 #if defined(OS_CHROMEOS)
399 if (arc::IsArcAllowedForProfile(profile_)) 398 if (arc::ArcSessionManager::IsAllowedForProfile(profile_))
400 arc_apps_builder_.reset(new ArcAppModelBuilder(controller)); 399 arc_apps_builder_.reset(new ArcAppModelBuilder(controller));
401 #endif 400 #endif
402 DCHECK(profile_); 401 DCHECK(profile_);
403 if (app_list::switches::IsAppListSyncEnabled()) { 402 if (app_list::switches::IsAppListSyncEnabled()) {
404 VLOG(1) << this << ": AppListSyncableService: InitializeWithService."; 403 VLOG(1) << this << ": AppListSyncableService: InitializeWithService.";
405 SyncStarted(); 404 SyncStarted();
406 apps_builder_->InitializeWithService(this, model_.get()); 405 apps_builder_->InitializeWithService(this, model_.get());
407 #if defined(OS_CHROMEOS) 406 #if defined(OS_CHROMEOS)
408 if (arc_apps_builder_.get()) 407 if (arc_apps_builder_.get())
409 arc_apps_builder_->InitializeWithService(this, model_.get()); 408 arc_apps_builder_->InitializeWithService(this, model_.get());
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 res += " { " + item_name + " }"; 1228 res += " { " + item_name + " }";
1230 res += " [" + item_ordinal.ToDebugString() + "]"; 1229 res += " [" + item_ordinal.ToDebugString() + "]";
1231 if (!parent_id.empty()) 1230 if (!parent_id.empty())
1232 res += " <" + parent_id.substr(0, 8) + ">"; 1231 res += " <" + parent_id.substr(0, 8) + ">";
1233 res += " [" + item_pin_ordinal.ToDebugString() + "]"; 1232 res += " [" + item_pin_ordinal.ToDebugString() + "]";
1234 } 1233 }
1235 return res; 1234 return res;
1236 } 1235 }
1237 1236
1238 } // namespace app_list 1237 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/note_taking_helper.cc ('k') | chrome/browser/ui/app_list/arc/arc_app_list_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698