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

Unified Diff: chrome/browser/extensions/api/identity/identity_api.h

Issue 410553002: Cleanup: Remove redundant MockGetAuthTokenFunction, add missing cases (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add negative cases for secondary accounts Created 6 years, 5 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 | « no previous file | chrome/browser/extensions/api/identity/identity_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/identity/identity_api.h
diff --git a/chrome/browser/extensions/api/identity/identity_api.h b/chrome/browser/extensions/api/identity/identity_api.h
index ddf348eb7bb338e84adec48641ecb957cd70fd63..3a062b4db3b8bf74cbcaff86cae51127c9b460f5 100644
--- a/chrome/browser/extensions/api/identity/identity_api.h
+++ b/chrome/browser/extensions/api/identity/identity_api.h
@@ -189,6 +189,10 @@ class IdentityGetAuthTokenFunction : public ChromeAsyncExtensionFunction,
IdentityGetAuthTokenFunction();
+ const ExtensionTokenKey* GetExtensionTokenKeyForTest() {
+ return token_key_.get();
+ }
+
protected:
virtual ~IdentityGetAuthTokenFunction();
@@ -203,6 +207,9 @@ class IdentityGetAuthTokenFunction : public ChromeAsyncExtensionFunction,
virtual void OnGaiaFlowCompleted(const std::string& access_token,
const std::string& expiration) OVERRIDE;
+ // Starts a login access token request.
+ virtual void StartLoginAccessTokenRequest();
+
// OAuth2TokenService::Consumer implementation:
virtual void OnGetTokenSuccess(const OAuth2TokenService::Request* request,
const std::string& access_token,
@@ -219,7 +226,6 @@ class IdentityGetAuthTokenFunction : public ChromeAsyncExtensionFunction,
ComponentWithNormalClientId);
FRIEND_TEST_ALL_PREFIXES(GetAuthTokenFunctionTest, InteractiveQueueShutdown);
FRIEND_TEST_ALL_PREFIXES(GetAuthTokenFunctionTest, NoninteractiveShutdown);
- friend class MockGetAuthTokenFunction;
// ExtensionFunction:
virtual bool RunAsync() OVERRIDE;
@@ -249,9 +255,6 @@ class IdentityGetAuthTokenFunction : public ChromeAsyncExtensionFunction,
// IdentityAPI::ShutdownObserver implementation:
virtual void OnShutdown() OVERRIDE;
- // Starts a login access token request.
- virtual void StartLoginAccessTokenRequest();
-
#if defined(OS_CHROMEOS)
// Starts a login access token request for device robot account. This method
// will be called only in enterprise kiosk mode in ChromeOS.
@@ -269,7 +272,7 @@ class IdentityGetAuthTokenFunction : public ChromeAsyncExtensionFunction,
const std::string& login_access_token);
// Checks if there is a master login token to mint tokens for the extension.
- virtual bool HasLoginToken() const;
+ bool HasLoginToken() const;
// Maps OAuth2 protocol errors to an error message returned to the
// developer in chrome.runtime.lastError.
« no previous file with comments | « no previous file | chrome/browser/extensions/api/identity/identity_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698