summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authormunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-24 19:46:46 +0000
committermunjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-24 19:46:46 +0000
commit5c4003aaaf88c341f789302285a3bdae4edf8b90 (patch)
tree914dab0f102924a3b606e6b03744e81b4a0bb04b /chrome/common
parent048e42fef753adc897f3f473ae656ed091292590 (diff)
downloadchromium_src-5c4003aaaf88c341f789302285a3bdae4edf8b90.zip
chromium_src-5c4003aaaf88c341f789302285a3bdae4edf8b90.tar.gz
chromium_src-5c4003aaaf88c341f789302285a3bdae4edf8b90.tar.bz2
Remove unused interceptors in WebAuthFlow and OAuth2MintTokenFlow.
BUG=138279 Review URL: https://chromiumcodereview.appspot.com/10795048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148172 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/net/gaia/oauth2_mint_token_flow.cc36
-rw-r--r--chrome/common/net/gaia/oauth2_mint_token_flow.h13
2 files changed, 0 insertions, 49 deletions
diff --git a/chrome/common/net/gaia/oauth2_mint_token_flow.cc b/chrome/common/net/gaia/oauth2_mint_token_flow.cc
index 087e0f7..a532f18 100644
--- a/chrome/common/net/gaia/oauth2_mint_token_flow.cc
+++ b/chrome/common/net/gaia/oauth2_mint_token_flow.cc
@@ -63,8 +63,6 @@ static GoogleServiceAuthError CreateAuthError(URLRequestStatus status) {
}
}
-OAuth2MintTokenFlow::InterceptorForTests* g_interceptor_for_tests = NULL;
-
} // namespace
IssueAdviceInfoEntry::IssueAdviceInfoEntry() {}
@@ -91,14 +89,6 @@ OAuth2MintTokenFlow::Parameters::Parameters(
OAuth2MintTokenFlow::Parameters::~Parameters() {}
-// static
-void OAuth2MintTokenFlow::SetInterceptorForTests(
- OAuth2MintTokenFlow::InterceptorForTests* interceptor) {
- CHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestType));
- CHECK(NULL == g_interceptor_for_tests); // Only one at a time.
- g_interceptor_for_tests = interceptor;
-}
-
OAuth2MintTokenFlow::OAuth2MintTokenFlow(
URLRequestContextGetter* context,
Delegate* delegate,
@@ -115,32 +105,6 @@ OAuth2MintTokenFlow::OAuth2MintTokenFlow(
OAuth2MintTokenFlow::~OAuth2MintTokenFlow() { }
-void OAuth2MintTokenFlow::Start() {
- if (g_interceptor_for_tests) {
- std::string auth_token;
- GoogleServiceAuthError error = GoogleServiceAuthError::None();
-
- // We use PostTask, instead of calling the delegate directly, because the
- // message loop will run a few times before we notify the delegate in the
- // real implementation.
- if (g_interceptor_for_tests->DoIntercept(this, &auth_token, &error)) {
- MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&OAuth2MintTokenFlow::ReportSuccess,
- weak_factory_.GetWeakPtr(), auth_token));
- } else {
- MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&OAuth2MintTokenFlow::ReportFailure,
- weak_factory_.GetWeakPtr(), error));
- }
- return;
- }
-
-
- OAuth2ApiCallFlow::Start();
-}
-
void OAuth2MintTokenFlow::FireAndForget() {
delete_when_done_ = true;
Start();
diff --git a/chrome/common/net/gaia/oauth2_mint_token_flow.h b/chrome/common/net/gaia/oauth2_mint_token_flow.h
index bae911c..fdd4dd0 100644
--- a/chrome/common/net/gaia/oauth2_mint_token_flow.h
+++ b/chrome/common/net/gaia/oauth2_mint_token_flow.h
@@ -97,24 +97,11 @@ class OAuth2MintTokenFlow : public OAuth2ApiCallFlow {
virtual ~Delegate() {}
};
- // An interceptor for tests.
- class InterceptorForTests {
- public:
- // Returns true if the success callback should be called and false for
- // failures.
- virtual bool DoIntercept(const OAuth2MintTokenFlow* flow,
- std::string* access_token,
- GoogleServiceAuthError* error) = 0;
- };
- static void SetInterceptorForTests(InterceptorForTests* interceptor);
-
OAuth2MintTokenFlow(net::URLRequestContextGetter* context,
Delegate* delegate,
const Parameters& parameters);
virtual ~OAuth2MintTokenFlow();
- virtual void Start() OVERRIDE;
-
// Starts the flow, and deletes |this| when done. Useful when the caller
// does not care about the response (|delegate_| is NULL).
void FireAndForget();