summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authorrickcam@chromium.org <rickcam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 01:53:41 +0000
committerrickcam@chromium.org <rickcam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 01:53:41 +0000
commit5ddcf3cd1011f72b883c5f0e1cf03311b3592613 (patch)
tree720a5421f8e564522053aa1ba6b7f6c59caac80d /chrome/browser/net
parent5714ee367605012c8bc79198b264ef83376be988 (diff)
downloadchromium_src-5ddcf3cd1011f72b883c5f0e1cf03311b3592613.zip
chromium_src-5ddcf3cd1011f72b883c5f0e1cf03311b3592613.tar.gz
chromium_src-5ddcf3cd1011f72b883c5f0e1cf03311b3592613.tar.bz2
Add a GoogleServiceAuthError parameter to GaiaOAuthConsumer::OnGetOAuthTokenFailure and notify SigninManager observers with chrome::NOTIFICATION_GOOGLE_SIGNIN_FAILED
BUG=92960 TEST=unit Review URL: http://codereview.chromium.org/7645040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97265 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/gaia/gaia_oauth_consumer.h2
-rw-r--r--chrome/browser/net/gaia/gaia_oauth_fetcher.cc6
-rw-r--r--chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc3
3 files changed, 7 insertions, 4 deletions
diff --git a/chrome/browser/net/gaia/gaia_oauth_consumer.h b/chrome/browser/net/gaia/gaia_oauth_consumer.h
index ca3a7ab..a1b67d2 100644
--- a/chrome/browser/net/gaia/gaia_oauth_consumer.h
+++ b/chrome/browser/net/gaia/gaia_oauth_consumer.h
@@ -17,7 +17,7 @@ class GaiaOAuthConsumer {
virtual ~GaiaOAuthConsumer() {}
virtual void OnGetOAuthTokenSuccess(const std::string& oauth_token) {}
- virtual void OnGetOAuthTokenFailure() {}
+ virtual void OnGetOAuthTokenFailure(const GoogleServiceAuthError& error) {}
virtual void OnOAuthGetAccessTokenSuccess(const std::string& token,
const std::string& secret) {}
diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc
index 18ceeec..f9b46eb 100644
--- a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc
+++ b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc
@@ -512,7 +512,8 @@ namespace {
void GaiaOAuthFetcher::OnBrowserClosing(Browser* browser,
bool detail) {
if (browser == popup_) {
- consumer_->OnGetOAuthTokenFailure();
+ consumer_->OnGetOAuthTokenFailure(
+ GoogleServiceAuthError(GoogleServiceAuthError::REQUEST_CANCELED));
}
popup_ = NULL;
}
@@ -557,7 +558,8 @@ void GaiaOAuthFetcher::OnGetOAuthTokenUrlFetched(
}
}
} else {
- consumer_->OnGetOAuthTokenFailure();
+ consumer_->OnGetOAuthTokenFailure(
+ GoogleServiceAuthError(GoogleServiceAuthError::SERVICE_UNAVAILABLE));
}
}
diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc b/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc
index 94a40b6..22fac88 100644
--- a/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc
+++ b/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc
@@ -57,7 +57,8 @@ class MockGaiaOAuthConsumer : public GaiaOAuthConsumer {
~MockGaiaOAuthConsumer() {}
MOCK_METHOD1(OnGetOAuthTokenSuccess, void(const std::string& oauth_token));
- MOCK_METHOD0(OnGetOAuthTokenFailure, void());
+ MOCK_METHOD1(OnGetOAuthTokenFailure,
+ void(const GoogleServiceAuthError& error));
MOCK_METHOD2(OnOAuthGetAccessTokenSuccess, void(const std::string& token,
const std::string& secret));