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

Unified Diff: chrome/browser/ui/webui/options/supervised_user_import_handler.cc

Issue 809313009: Make the SigninErrorController a PKS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary header Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/options/supervised_user_import_handler.cc
diff --git a/chrome/browser/ui/webui/options/supervised_user_import_handler.cc b/chrome/browser/ui/webui/options/supervised_user_import_handler.cc
index bed6d5d41538578ee47fd020b44c136df508736e..b6133dc98bc53d4676278be03acc0584b691c93a 100644
--- a/chrome/browser/ui/webui/options/supervised_user_import_handler.cc
+++ b/chrome/browser/ui/webui/options/supervised_user_import_handler.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/profiles/profile_avatar_icon_util.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
+#include "chrome/browser/signin/signin_error_controller_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/supervised_user/supervised_user_constants.h"
#include "chrome/browser/supervised_user/supervised_user_shared_settings_service.h"
@@ -23,7 +23,6 @@
#include "chrome/browser/supervised_user/supervised_user_sync_service_factory.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.h"
-#include "components/signin/core/browser/profile_oauth2_token_service.h"
#include "components/signin/core/browser/signin_error_controller.h"
#include "components/signin/core/browser/signin_manager.h"
#include "content/public/browser/web_ui.h"
@@ -93,8 +92,7 @@ void SupervisedUserImportHandler::InitializeHandler() {
SupervisedUserSyncServiceFactory::GetForProfile(profile);
if (sync_service) {
sync_service->AddObserver(this);
- observer_.Add(ProfileOAuth2TokenServiceFactory::GetForProfile(profile)->
- signin_error_controller());
+ observer_.Add(SigninErrorControllerFactory::GetForProfile(profile));
SupervisedUserSharedSettingsService* settings_service =
SupervisedUserSharedSettingsServiceFactory::GetForBrowserContext(
profile);
@@ -104,7 +102,7 @@ void SupervisedUserImportHandler::InitializeHandler() {
} else {
DCHECK(!SupervisedUserSharedSettingsServiceFactory::GetForBrowserContext(
profile));
- DCHECK(!ProfileOAuth2TokenServiceFactory::GetForProfile(profile));
+ DCHECK(!SigninErrorControllerFactory::GetForProfile(profile));
}
}
}
@@ -224,13 +222,10 @@ bool SupervisedUserImportHandler::IsAccountConnected() const {
bool SupervisedUserImportHandler::HasAuthError() const {
Profile* profile = Profile::FromWebUI(web_ui());
- ProfileOAuth2TokenService* token_service =
- ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
- if (!token_service)
- return true;
-
SigninErrorController* error_controller =
- token_service->signin_error_controller();
+ SigninErrorControllerFactory::GetForProfile(profile);
+ if (!error_controller)
+ return true;
GoogleServiceAuthError::State state = error_controller->auth_error().state();
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.cc ('k') | chrome/browser/ui/webui/options/sync_setup_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698