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

Unified Diff: components/signin/core/browser/profile_oauth2_token_service.h

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.h
diff --git a/components/signin/core/browser/profile_oauth2_token_service.h b/components/signin/core/browser/profile_oauth2_token_service.h
index 13210c1fcfe5ba4f087972a943d54bd36ab79aba..c5a3c201ed72c036f8f19013df68ef2bd97feb70 100644
--- a/components/signin/core/browser/profile_oauth2_token_service.h
+++ b/components/signin/core/browser/profile_oauth2_token_service.h
@@ -10,7 +10,6 @@
#include "base/gtest_prod_util.h"
#include "base/memory/linked_ptr.h"
#include "components/keyed_service/core/keyed_service.h"
-#include "components/signin/core/browser/signin_error_controller.h"
#include "google_apis/gaia/oauth2_token_service.h"
namespace net {
@@ -19,6 +18,7 @@ class URLRequestContextGetter;
class GoogleServiceAuthError;
class SigninClient;
+class SigninErrorController;
// ProfileOAuth2TokenService is a KeyedService that retrieves
// OAuth2 access tokens for a given set of scopes using the OAuth2 login
@@ -40,7 +40,8 @@ class ProfileOAuth2TokenService : public OAuth2TokenService,
~ProfileOAuth2TokenService() override;
// Initializes this token service with the SigninClient.
- virtual void Initialize(SigninClient* client);
+ virtual void Initialize(SigninClient* client,
+ SigninErrorController* signin_error_controller);
// KeyedService implementation.
void Shutdown() override;
@@ -67,14 +68,6 @@ class ProfileOAuth2TokenService : public OAuth2TokenService,
// Revokes all credentials handled by the object.
virtual void RevokeAllCredentials();
- SigninErrorController* signin_error_controller() {
- return signin_error_controller_.get();
- }
-
- const SigninErrorController* signin_error_controller() const {
- return signin_error_controller_.get();
- }
-
SigninClient* client() const { return client_; }
protected:
@@ -96,12 +89,16 @@ class ProfileOAuth2TokenService : public OAuth2TokenService,
// when invalid.
void ValidateAccountId(const std::string& account_id) const;
+ SigninErrorController* signin_error_controller() {
+ return signin_error_controller_;
+ }
+
private:
// The client with which this instance was initialized, or NULL.
SigninClient* client_;
- // Used to expose auth errors to the UI.
- scoped_ptr<SigninErrorController> signin_error_controller_;
+ // The error controller with which this instance was initialized, or NULL.
+ SigninErrorController* signin_error_controller_;
DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenService);
};

Powered by Google App Engine
This is Rietveld 408576698