diff options
author | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-22 01:39:07 +0000 |
---|---|---|
committer | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-22 01:39:07 +0000 |
commit | 11c28aed164f5bacfb137800ba360c7e50f7cdc5 (patch) | |
tree | e18dce2f3d6be69b26ca76d30dad1356ce28371a | |
parent | 9abd5ec877f61b73af61a0239afa07c48e1def50 (diff) | |
download | chromium_src-11c28aed164f5bacfb137800ba360c7e50f7cdc5.zip chromium_src-11c28aed164f5bacfb137800ba360c7e50f7cdc5.tar.gz chromium_src-11c28aed164f5bacfb137800ba360c7e50f7cdc5.tar.bz2 |
Allow clearing tokens with cmd-line flags from release builds.
BUG=107499
TEST=try using clear-token flags on release builds.
Review URL: http://codereview.chromium.org/8989029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115461 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/net/gaia/token_service.cc | 2 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 8 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 5 |
3 files changed, 6 insertions, 9 deletions
diff --git a/chrome/browser/net/gaia/token_service.cc b/chrome/browser/net/gaia/token_service.cc index 8ec0de6..031719e 100644 --- a/chrome/browser/net/gaia/token_service.cc +++ b/chrome/browser/net/gaia/token_service.cc @@ -64,7 +64,6 @@ void TokenService::Initialize(const char* const source, web_data_service_ = profile->GetWebDataService(Profile::EXPLICIT_ACCESS); source_ = std::string(source); -#ifndef NDEBUG CommandLine* cmd_line = CommandLine::ForCurrentProcess(); // Allow the token service to be cleared from the command line. if (cmd_line->HasSwitch(switches::kClearTokenService)) @@ -79,7 +78,6 @@ void TokenService::Initialize(const char* const source, token_map_[service] = token; SaveAuthTokenToDB(service, token); } -#endif registrar_.Add(this, chrome::NOTIFICATION_TOKEN_UPDATED, diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 5e01f7b..f9a8cd6 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -1303,10 +1303,6 @@ const char kDebugViewsPaint[] = "debug-views-paint"; const char kTouchDevices[] = "touch-devices"; #endif -#ifndef NDEBUG -// URL of the OAuth server host -const char kOAuthHostUrl[] = "oauth-host-url"; - // Clears the token service before using it. This allows simulating the // expiration of credentials during testing. const char kClearTokenService[] = "clear-token-service"; @@ -1314,6 +1310,10 @@ const char kClearTokenService[] = "clear-token-service"; // Sets a token in the token service, for testing. const char kSetToken[] = "set-token"; +#ifndef NDEBUG +// URL of the OAuth server host +const char kOAuthHostUrl[] = "oauth-host-url"; + // Debug-only switch to specify which websocket live experiment host to be // used. If host is specified, it also makes initial delay shorter (5 min to 5 // sec) to make it faster to test websocket live experiment code. diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 01ecf9e..8c2629f 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -53,6 +53,7 @@ extern const char kAutomationReinitializeOnChannelError[]; extern const char kCheckForUpdateIntervalSec[]; extern const char kChromeVersion[]; extern const char kCipherSuiteBlacklist[]; +extern const char kClearTokenService[]; extern const char kCloudPrintDeleteFile[]; extern const char kCloudPrintFile[]; extern const char kCloudPrintJobTitle[]; @@ -276,6 +277,7 @@ extern const char kSbDisableAutoUpdate[]; extern const char kSbDisableDownloadProtection[]; extern const char kSearchInOmniboxHint[]; extern const char kServiceAccountLsid[]; +extern const char kSetToken[]; extern const char kShowAutofillTypePredictions[]; extern const char kShowComponentExtensionOptions[]; extern const char kShowCompositedLayerBorders[]; @@ -373,11 +375,8 @@ extern const char kDebugViewsPaint[]; extern const char kTouchDevices[]; #endif - #ifndef NDEBUG extern const char kOAuthHostUrl[]; -extern const char kClearTokenService[]; -extern const char kSetToken[]; extern const char kWebSocketLiveExperimentHost[]; extern const char kFileManagerExtensionPath[]; #endif |