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

Unified Diff: components/signin/core/browser/profile_oauth2_token_service.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: components/signin/core/browser/profile_oauth2_token_service.cc
diff --git a/components/signin/core/browser/profile_oauth2_token_service.cc b/components/signin/core/browser/profile_oauth2_token_service.cc
index 73c513ed44029c379b101af9fb20655fe06e9da8..0de1e2b6ded4e1848305cf2f9531007fce7b408d 100644
--- a/components/signin/core/browser/profile_oauth2_token_service.cc
+++ b/components/signin/core/browser/profile_oauth2_token_service.cc
@@ -14,25 +14,24 @@
#include "net/url_request/url_request_context_getter.h"
ProfileOAuth2TokenService::ProfileOAuth2TokenService()
- : client_(NULL) {}
+ : client_(NULL),
+ signin_error_controller_(NULL) {}
-ProfileOAuth2TokenService::~ProfileOAuth2TokenService() {
- DCHECK(!signin_error_controller_.get()) <<
- "ProfileOAuth2TokenService::Initialize called but not "
- "ProfileOAuth2TokenService::Shutdown";
-}
+ProfileOAuth2TokenService::~ProfileOAuth2TokenService() {}
-void ProfileOAuth2TokenService::Initialize(SigninClient* client) {
+void ProfileOAuth2TokenService::Initialize(
+ SigninClient* client,
+ SigninErrorController* signin_error_controller) {
DCHECK(client);
DCHECK(!client_);
+ DCHECK(signin_error_controller);
+ DCHECK(!signin_error_controller_);
client_ = client;
-
- signin_error_controller_.reset(new SigninErrorController());
+ signin_error_controller_ = signin_error_controller;
}
void ProfileOAuth2TokenService::Shutdown() {
DCHECK(client_) << "Shutdown() called without matching call to Initialize()";
- signin_error_controller_.reset();
}
net::URLRequestContextGetter* ProfileOAuth2TokenService::GetRequestContext() {

Powered by Google App Engine
This is Rietveld 408576698