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

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

Issue 10834262: Enabled SignInAfterInit test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/browser/policy/user_policy_signin_service_unittest.cc ('k') | net/url_request/url_fetcher_core.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/token_service.h
diff --git a/chrome/browser/signin/token_service.h b/chrome/browser/signin/token_service.h
index a4106d63cde735e2a9d7b2880e2b92e33c13adc2..ea7bd6e18b77cc2b61ec7a8b2c4000123a317e2b 100644
--- a/chrome/browser/signin/token_service.h
+++ b/chrome/browser/signin/token_service.h
@@ -31,6 +31,15 @@
// SetMyToken(notification.token())
// }
// }
+//
+// There is currently no easy way to create a fake TokenService. Tests that want
+// to use TokenService to issue tokens without the use of fake GaiaAuthFetchers
+// or persisting the tokens to disk via WebDataService can do this by
+// creating a TokenService (skipping the Initialize() step to avoid interacting
+// with WebDataService) and calling IssueAuthTokenForTest() to issue new tokens.
+// This will result in the TokenService sending out the appropriate
+// TOKEN_AVAILABLE notification and returning the correct response to future
+// calls to Has/GetTokenForService().
#ifndef CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_H_
#define CHROME_BROWSER_SIGNIN_TOKEN_SERVICE_H_
« no previous file with comments | « chrome/browser/policy/user_policy_signin_service_unittest.cc ('k') | net/url_request/url_fetcher_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698