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

Side by Side Diff: chrome/browser/ui/avatar_button_error_controller.cc

Issue 2388163002: [Sync] Move //components/sync to the syncer namespace, take 2. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/avatar_button_error_controller.h" 5 #include "chrome/browser/ui/avatar_button_error_controller.h"
6 6
7 #include "chrome/browser/profiles/profiles_state.h" 7 #include "chrome/browser/profiles/profiles_state.h"
8 #include "chrome/browser/sync/profile_sync_service_factory.h" 8 #include "chrome/browser/sync/profile_sync_service_factory.h"
9 #include "components/browser_sync/profile_sync_service.h" 9 #include "components/browser_sync/profile_sync_service.h"
10 #include "components/signin/core/browser/signin_error_controller.h" 10 #include "components/signin/core/browser/signin_error_controller.h"
11 #include "components/signin/core/common/profile_management_switches.h" 11 #include "components/signin/core/common/profile_management_switches.h"
12 12
13 using syncer::SyncErrorController;
14
13 AvatarButtonErrorController::AvatarButtonErrorController( 15 AvatarButtonErrorController::AvatarButtonErrorController(
14 AvatarButtonErrorControllerDelegate* delegate, 16 AvatarButtonErrorControllerDelegate* delegate,
15 Profile* profile) 17 Profile* profile)
16 : delegate_(delegate), 18 : delegate_(delegate),
17 avatar_signin_error_controller_(profile, this), 19 avatar_signin_error_controller_(profile, this),
18 avatar_sync_error_controller_(profile, this), 20 avatar_sync_error_controller_(profile, this),
19 has_signin_error_(avatar_signin_error_controller_.HasSigninError()), 21 has_signin_error_(avatar_signin_error_controller_.HasSigninError()),
20 has_sync_error_(avatar_sync_error_controller_.HasSyncError()) {} 22 has_sync_error_(avatar_sync_error_controller_.HasSyncError()) {}
21 23
22 AvatarButtonErrorController::~AvatarButtonErrorController() {} 24 AvatarButtonErrorController::~AvatarButtonErrorController() {}
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 101 }
100 102
101 SyncErrorController* AvatarButtonErrorController::SyncErrorObserver:: 103 SyncErrorController* AvatarButtonErrorController::SyncErrorObserver::
102 GetSyncErrorControllerIfNeeded() { 104 GetSyncErrorControllerIfNeeded() {
103 if (!switches::IsMaterialDesignUserMenu()) 105 if (!switches::IsMaterialDesignUserMenu())
104 return nullptr; 106 return nullptr;
105 browser_sync::ProfileSyncService* sync_service = 107 browser_sync::ProfileSyncService* sync_service =
106 ProfileSyncServiceFactory::GetForProfile(profile_); 108 ProfileSyncServiceFactory::GetForProfile(profile_);
107 return sync_service ? sync_service->sync_error_controller() : nullptr; 109 return sync_service ? sync_service->sync_error_controller() : nullptr;
108 } 110 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/avatar_button_error_controller.h ('k') | chrome/browser/ui/cocoa/app_menu/app_menu_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698