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

Unified Diff: chrome/browser/signin/profile_oauth2_token_service_request.h

Issue 12647008: Refactor OAuth2TokenService to have profile- and device-based implementations. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase again Created 7 years, 8 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/signin/profile_oauth2_token_service_request.h
diff --git a/chrome/browser/signin/oauth2_token_service_request.h b/chrome/browser/signin/profile_oauth2_token_service_request.h
similarity index 37%
rename from chrome/browser/signin/oauth2_token_service_request.h
rename to chrome/browser/signin/profile_oauth2_token_service_request.h
index 8ab4b79e64f0e65f609a7994f6fd7dbf131195e6..bcb1ff8cd8521d3f99bceb9c38cde00465d42bcd 100644
--- a/chrome/browser/signin/oauth2_token_service_request.h
+++ b/chrome/browser/signin/profile_oauth2_token_service_request.h
@@ -2,50 +2,46 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_SIGNIN_OAUTH2_TOKEN_SERVICE_REQUEST_H_
-#define CHROME_BROWSER_SIGNIN_OAUTH2_TOKEN_SERVICE_REQUEST_H_
+#ifndef CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_REQUEST_H_
+#define CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_REQUEST_H_
#include <set>
#include <string>
-#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
-#include "base/time.h"
#include "chrome/browser/signin/oauth2_token_service.h"
-#include "google_apis/gaia/google_service_auth_error.h"
class Profile;
-// OAuth2TokenServiceRequest represents a request to fetch an OAuth2 access
-// token for a given set of |scopes| by calling |profile|'s
-// OAuth2TokenService. A request can be created and started from any thread
-// with an object |consumer| that will be called back on the same thread when
-// fetching completes.
-// If the request is destructed before |consumer| is called, |consumer| will
-// never be called back. (Note the actual network activities are not canceled
-// and the cache in OAuth2TokenService will be populated with the fetched
-// results.)
-class OAuth2TokenServiceRequest : public OAuth2TokenService::Request,
- public base::NonThreadSafe {
+// ProfileOAuth2TokenServiceRequest represents a request to fetch an
+// OAuth2 access token for a given set of |scopes| by calling |profile|'s
+// ProfileOAuth2TokenService. A request can be created and started from
+// any thread with an object |consumer| that will be called back on the
+// same thread when fetching completes. If the request is destructed
+// before |consumer| is called, |consumer| will never be called back. (Note
+// the actual network activities are not canceled and the cache in
+// ProfileOAuth2TokenService will be populated with the fetched results.)
+class ProfileOAuth2TokenServiceRequest : public OAuth2TokenService::Request,
+ public base::NonThreadSafe {
public:
- static OAuth2TokenServiceRequest* CreateAndStart(
+ static ProfileOAuth2TokenServiceRequest* CreateAndStart(
Profile* profile,
const OAuth2TokenService::ScopeSet& scopes,
OAuth2TokenService::Consumer* consumer);
- virtual ~OAuth2TokenServiceRequest();
+ virtual ~ProfileOAuth2TokenServiceRequest();
private:
class Core;
friend class Core;
- OAuth2TokenServiceRequest(Profile* profile,
+ ProfileOAuth2TokenServiceRequest(Profile* profile,
const OAuth2TokenService::ScopeSet& scopes,
OAuth2TokenService::Consumer* consumer);
OAuth2TokenService::Consumer* const consumer_;
scoped_refptr<Core> core_;
- DISALLOW_COPY_AND_ASSIGN(OAuth2TokenServiceRequest);
+ DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceRequest);
};
-#endif // CHROME_BROWSER_SIGNIN_OAUTH2_TOKEN_SERVICE_REQUEST_H_
+#endif // CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_REQUEST_H_

Powered by Google App Engine
This is Rietveld 408576698