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

Unified Diff: google_apis/gaia/fake_oauth2_token_service.h

Issue 136723009: Move UbertokenFetcher from //chrome to //google_apis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | google_apis/gaia/fake_oauth2_token_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gaia/fake_oauth2_token_service.h
diff --git a/google_apis/gaia/fake_oauth2_token_service.h b/google_apis/gaia/fake_oauth2_token_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..c3b4aecc743971018e4fbfcbd8a646728d25207e
--- /dev/null
+++ b/google_apis/gaia/fake_oauth2_token_service.h
@@ -0,0 +1,46 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef GOOGLE_APIS_GAIA_FAKE_OAUTH2_TOKEN_SERVICE_H_
+#define GOOGLE_APIS_GAIA_FAKE_OAUTH2_TOKEN_SERVICE_H_
+
+#include <string>
+
+#include "base/compiler_specific.h"
+#include "google_apis/gaia/oauth2_token_service.h"
+
+namespace net {
+class URLRequestContextGetter;
+}
+
+// Do-nothing implementation of OAuth2TokenService.
+class FakeOAuth2TokenService : public OAuth2TokenService {
+ public:
+ FakeOAuth2TokenService();
+ virtual ~FakeOAuth2TokenService();
+
+ protected:
+ // OAuth2TokenService overrides.
+ virtual void FetchOAuth2Token(RequestImpl* request,
+ const std::string& account_id,
+ net::URLRequestContextGetter* getter,
+ const std::string& client_id,
+ const std::string& client_secret,
+ const ScopeSet& scopes) OVERRIDE;
+
+ virtual void InvalidateOAuth2Token(const std::string& account_id,
+ const std::string& client_id,
+ const ScopeSet& scopes,
+ const std::string& access_token) OVERRIDE;
+
+ virtual std::string GetRefreshToken(const std::string& account_id) OVERRIDE;
+
+ private:
+ // OAuth2TokenService overrides.
+ virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeOAuth2TokenService);
+};
+
+#endif // GOOGLE_APIS_GAIA_FAKE_OAUTH2_TOKEN_SERVICE_H_
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | google_apis/gaia/fake_oauth2_token_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698