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

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

Issue 2642783003: Move more utility functions to arc_util. (Closed)
Patch Set: address comments 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"
44 #include "chrome/browser/chromeos/file_manager/app_id.h" 45 #include "chrome/browser/chromeos/file_manager/app_id.h"
45 #include "chrome/browser/chromeos/genius_app/app_id.h" 46 #include "chrome/browser/chromeos/genius_app/app_id.h"
46 #include "chrome/browser/ui/app_list/arc/arc_app_item.h" 47 #include "chrome/browser/ui/app_list/arc/arc_app_item.h"
47 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" 48 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
48 #include "chrome/browser/ui/app_list/arc/arc_app_model_builder.h" 49 #include "chrome/browser/ui/app_list/arc/arc_app_model_builder.h"
49 #endif 50 #endif
50 51
51 using syncer::SyncChange; 52 using syncer::SyncChange;
52 53
53 namespace app_list { 54 namespace app_list {
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 InitFromLocalStorage(); 389 InitFromLocalStorage();
389 390
390 // TODO(calamity): make this a DCHECK after a dev channel release. 391 // TODO(calamity): make this a DCHECK after a dev channel release.
391 CHECK(IsExtensionServiceReady()); 392 CHECK(IsExtensionServiceReady());
392 AppListControllerDelegate* controller = NULL; 393 AppListControllerDelegate* controller = NULL;
393 AppListService* service = AppListService::Get(); 394 AppListService* service = AppListService::Get();
394 if (service) 395 if (service)
395 controller = service->GetControllerDelegate(); 396 controller = service->GetControllerDelegate();
396 apps_builder_.reset(new ExtensionAppModelBuilder(controller)); 397 apps_builder_.reset(new ExtensionAppModelBuilder(controller));
397 #if defined(OS_CHROMEOS) 398 #if defined(OS_CHROMEOS)
398 if (arc::ArcSessionManager::IsAllowedForProfile(profile_)) 399 if (arc::IsArcAllowedForProfile(profile_))
399 arc_apps_builder_.reset(new ArcAppModelBuilder(controller)); 400 arc_apps_builder_.reset(new ArcAppModelBuilder(controller));
400 #endif 401 #endif
401 DCHECK(profile_); 402 DCHECK(profile_);
402 if (app_list::switches::IsAppListSyncEnabled()) { 403 if (app_list::switches::IsAppListSyncEnabled()) {
403 VLOG(1) << this << ": AppListSyncableService: InitializeWithService."; 404 VLOG(1) << this << ": AppListSyncableService: InitializeWithService.";
404 SyncStarted(); 405 SyncStarted();
405 apps_builder_->InitializeWithService(this, model_.get()); 406 apps_builder_->InitializeWithService(this, model_.get());
406 #if defined(OS_CHROMEOS) 407 #if defined(OS_CHROMEOS)
407 if (arc_apps_builder_.get()) 408 if (arc_apps_builder_.get())
408 arc_apps_builder_->InitializeWithService(this, model_.get()); 409 arc_apps_builder_->InitializeWithService(this, model_.get());
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 res += " { " + item_name + " }"; 1229 res += " { " + item_name + " }";
1229 res += " [" + item_ordinal.ToDebugString() + "]"; 1230 res += " [" + item_ordinal.ToDebugString() + "]";
1230 if (!parent_id.empty()) 1231 if (!parent_id.empty())
1231 res += " <" + parent_id.substr(0, 8) + ">"; 1232 res += " <" + parent_id.substr(0, 8) + ">";
1232 res += " [" + item_pin_ordinal.ToDebugString() + "]"; 1233 res += " [" + item_pin_ordinal.ToDebugString() + "]";
1233 } 1234 }
1234 return res; 1235 return res;
1235 } 1236 }
1236 1237
1237 } // namespace app_list 1238 } // 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