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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc

Issue 2507073002: Split ArcSessionManager from ArcAuthService. (Closed)
Patch Set: Fix rebase mistake Created 4 years, 1 month 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/ash/launcher/chrome_launcher_controller_impl.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 app_sync_ui_state_ = AppSyncUIState::Get(profile); 203 app_sync_ui_state_ = AppSyncUIState::Get(profile);
204 if (app_sync_ui_state_) 204 if (app_sync_ui_state_)
205 app_sync_ui_state_->AddObserver(this); 205 app_sync_ui_state_->AddObserver(this);
206 } 206 }
207 207
208 // All profile relevant settings get bound to the current profile. 208 // All profile relevant settings get bound to the current profile.
209 AttachProfile(profile); 209 AttachProfile(profile);
210 model_->AddObserver(this); 210 model_->AddObserver(this);
211 211
212 if (arc::ArcAuthService::IsAllowedForProfile(this->profile())) 212 if (arc::ArcSessionManager::IsAllowedForProfile(this->profile()))
213 arc_deferred_launcher_.reset(new ArcAppDeferredLauncherController(this)); 213 arc_deferred_launcher_.reset(new ArcAppDeferredLauncherController(this));
214 214
215 // In multi profile mode we might have a window manager. We try to create it 215 // In multi profile mode we might have a window manager. We try to create it
216 // here. If the instantiation fails, the manager is not needed. 216 // here. If the instantiation fails, the manager is not needed.
217 chrome::MultiUserWindowManager::CreateInstance(); 217 chrome::MultiUserWindowManager::CreateInstance();
218 218
219 // On Chrome OS using multi profile we want to switch the content of the shelf 219 // On Chrome OS using multi profile we want to switch the content of the shelf
220 // with a user change. Note that for unit tests the instance can be NULL. 220 // with a user change. Note that for unit tests the instance can be NULL.
221 if (chrome::MultiUserWindowManager::GetMultiProfileMode() != 221 if (chrome::MultiUserWindowManager::GetMultiProfileMode() !=
222 chrome::MultiUserWindowManager::MULTI_PROFILE_MODE_OFF) { 222 chrome::MultiUserWindowManager::MULTI_PROFILE_MODE_OFF) {
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 pref_change_registrar_.Add( 876 pref_change_registrar_.Add(
877 prefs::kTouchVirtualKeyboardEnabled, 877 prefs::kTouchVirtualKeyboardEnabled,
878 base::Bind( 878 base::Bind(
879 &ChromeLauncherControllerImpl::SetVirtualKeyboardBehaviorFromPrefs, 879 &ChromeLauncherControllerImpl::SetVirtualKeyboardBehaviorFromPrefs,
880 base::Unretained(this))); 880 base::Unretained(this)));
881 881
882 std::unique_ptr<LauncherAppUpdater> extension_app_updater( 882 std::unique_ptr<LauncherAppUpdater> extension_app_updater(
883 new LauncherExtensionAppUpdater(this, profile())); 883 new LauncherExtensionAppUpdater(this, profile()));
884 app_updaters_.push_back(std::move(extension_app_updater)); 884 app_updaters_.push_back(std::move(extension_app_updater));
885 885
886 if (arc::ArcAuthService::IsAllowedForProfile(profile())) { 886 if (arc::ArcSessionManager::IsAllowedForProfile(profile())) {
887 std::unique_ptr<LauncherAppUpdater> arc_app_updater( 887 std::unique_ptr<LauncherAppUpdater> arc_app_updater(
888 new LauncherArcAppUpdater(this, profile())); 888 new LauncherArcAppUpdater(this, profile()));
889 app_updaters_.push_back(std::move(arc_app_updater)); 889 app_updaters_.push_back(std::move(arc_app_updater));
890 } 890 }
891 891
892 app_list::AppListSyncableService* app_service = 892 app_list::AppListSyncableService* app_service =
893 app_list::AppListSyncableServiceFactory::GetForProfile(profile()); 893 app_list::AppListSyncableServiceFactory::GetForProfile(profile());
894 if (app_service) 894 if (app_service)
895 app_service->AddObserverAndStart(this); 895 app_service->AddObserverAndStart(this);
896 } 896 }
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 LauncherItemController* controller = GetLauncherItemController(item.id); 1550 LauncherItemController* controller = GetLauncherItemController(item.id);
1551 if (!controller || controller->image_set_by_controller()) 1551 if (!controller || controller->image_set_by_controller())
1552 continue; 1552 continue;
1553 item.image = image; 1553 item.image = image;
1554 if (arc_deferred_launcher_) 1554 if (arc_deferred_launcher_)
1555 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); 1555 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image);
1556 model_->Set(index, item); 1556 model_->Set(index, item);
1557 // It's possible we're waiting on more than one item, so don't break. 1557 // It's possible we're waiting on more than one item, so don't break.
1558 } 1558 }
1559 } 1559 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698