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

Side by Side Diff: chrome/browser/signin/fake_profile_oauth2_token_service.h

Issue 148513010: Eliminate ProfileOAuth2TokenService being a BCKS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_
6 #define CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_ 6 #define CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 const base::Time& expiration); 103 const base::Time& expiration);
104 104
105 void IssueErrorForAllPendingRequests(const GoogleServiceAuthError& error); 105 void IssueErrorForAllPendingRequests(const GoogleServiceAuthError& error);
106 106
107 void set_auto_post_fetch_response_on_message_loop(bool auto_post_response) { 107 void set_auto_post_fetch_response_on_message_loop(bool auto_post_response) {
108 auto_post_fetch_response_on_message_loop_ = auto_post_response; 108 auto_post_fetch_response_on_message_loop_ = auto_post_response;
109 } 109 }
110 110
111 // Helper function to be used with 111 // Helper function to be used with
112 // BrowserContextKeyedService::SetTestingFactory(). 112 // BrowserContextKeyedService::SetTestingFactory().
113 static BrowserContextKeyedService* Build(content::BrowserContext* profile); 113 static BrowserContextKeyedService* Build(content::BrowserContext* context);
blundell 2014/02/10 16:19:16 These functions should move to be on the FakePO2TS
Roger Tawa OOO till Jul 10th 2014/02/10 19:49:13 Probably makes sense to do it as part of this CL,
blundell 2014/02/13 16:07:06 Done.
114 114
115 // Helper function to be used with 115 // Helper function to be used with
116 // BrowserContextKeyedService::SetTestingFactory() that creates a 116 // BrowserContextKeyedService::SetTestingFactory() that creates a
117 // FakeProfileOAuth2TokenService object that posts fetch responses on the 117 // FakeProfileOAuth2TokenService object that posts fetch responses on the
118 // current message loop. 118 // current message loop.
119 static BrowserContextKeyedService* BuildAutoIssuingTokenService( 119 static BrowserContextKeyedService* BuildAutoIssuingTokenService(
120 content::BrowserContext* profile); 120 content::BrowserContext* context);
121 121
122 protected: 122 protected:
123 // OAuth2TokenService overrides. 123 // OAuth2TokenService overrides.
124 virtual void FetchOAuth2Token(RequestImpl* request, 124 virtual void FetchOAuth2Token(RequestImpl* request,
125 const std::string& account_id, 125 const std::string& account_id,
126 net::URLRequestContextGetter* getter, 126 net::URLRequestContextGetter* getter,
127 const std::string& client_id, 127 const std::string& client_id,
128 const std::string& client_secret, 128 const std::string& client_secret,
129 const ScopeSet& scopes) OVERRIDE; 129 const ScopeSet& scopes) OVERRIDE;
130 130
(...skipping 24 matching lines...) Expand all
155 155
156 // If true, then this fake service will post responses to 156 // If true, then this fake service will post responses to
157 // |FetchOAuth2Token| on the current run loop. There is no need to call 157 // |FetchOAuth2Token| on the current run loop. There is no need to call
158 // |IssueTokenForScope| in this case. 158 // |IssueTokenForScope| in this case.
159 bool auto_post_fetch_response_on_message_loop_; 159 bool auto_post_fetch_response_on_message_loop_;
160 160
161 DISALLOW_COPY_AND_ASSIGN(FakeProfileOAuth2TokenService); 161 DISALLOW_COPY_AND_ASSIGN(FakeProfileOAuth2TokenService);
162 }; 162 };
163 163
164 #endif // CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_ 164 #endif // CHROME_BROWSER_SIGNIN_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698