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

Unified Diff: google_apis/gaia/oauth2_token_service.h

Issue 2685123002: Make OAuth2TokenService and subclasses take delegate by unique_ptr (Closed)
Patch Set: Created 3 years, 10 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: google_apis/gaia/oauth2_token_service.h
diff --git a/google_apis/gaia/oauth2_token_service.h b/google_apis/gaia/oauth2_token_service.h
index 6bad4d87fedc85af6bff5c7219254c5f50041823..e0b1cf49a8cfb5531411e92753aa27eabd0c06d8 100644
--- a/google_apis/gaia/oauth2_token_service.h
+++ b/google_apis/gaia/oauth2_token_service.h
@@ -136,7 +136,8 @@ class OAuth2TokenService : public base::NonThreadSafe {
const ScopeSet& scopes) = 0;
};
- explicit OAuth2TokenService(OAuth2TokenServiceDelegate* delegate);
+ explicit OAuth2TokenService(
+ std::unique_ptr<OAuth2TokenServiceDelegate> delegate);
virtual ~OAuth2TokenService();
// Add or remove observers of this token service.
@@ -213,6 +214,7 @@ class OAuth2TokenService : public base::NonThreadSafe {
const ScopeSet& scopes) const;
OAuth2TokenServiceDelegate* GetDelegate();
+ const OAuth2TokenServiceDelegate* GetDelegate() const;
protected:
// Implements a cancelable |OAuth2TokenService::Request|, which should be

Powered by Google App Engine
This is Rietveld 408576698