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

Unified Diff: chrome/browser/net/gaia/gaia_oauth_fetcher.cc

Issue 9117048: Revert r118627 and r118640 "Update Gaia URL." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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/net/browser_url_util_unittest.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/gaia/gaia_oauth_fetcher.cc
diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc
index 9145390403a06bf07ac9017515296ce46b25c062..4ede11e4527865e6ac390263b491ee015398498e 100644
--- a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc
+++ b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -11,7 +11,6 @@
#include "base/json/json_reader.h"
#include "base/string_split.h"
#include "base/string_util.h"
-#include "chrome/browser/net/browser_url_util.h"
#include "chrome/browser/net/gaia/gaia_oauth_consumer.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tabs/tab_strip_model.h"
@@ -687,45 +686,7 @@ void GaiaOAuthFetcher::OnURLFetchComplete(const content::URLFetcher* source) {
true)) {
OnOAuthRevokeTokenFetched(data, status, response_code);
} else {
- // Invalid cookies cause Gaia to redirect to ServiceLogin. Check if
- // this is the case and report failure properly.
- std::string url_no_query = url.GetOrigin().spec() + url.path().substr(1);
- std::string continue_url;
- if (url_no_query == gaia_urls->service_login_url() &&
- chrome_browser_net::GetValueForKeyInQuery(url, "continue",
- &continue_url)) {
- LOG(ERROR) << "GaiaOAuthFetcher redirected to service login"
- << " , url=" << url.spec();
-
- if (StartsWithASCII(continue_url,
- gaia_urls->get_oauth_token_url(),
- true)) {
- consumer_->OnGetOAuthTokenFailure(GoogleServiceAuthError(
- GoogleServiceAuthError::SERVICE_UNAVAILABLE));
- } else if (continue_url == gaia_urls->oauth1_login_url()) {
- consumer_->OnOAuthLoginFailure(GoogleServiceAuthError(
- GoogleServiceAuthError::SERVICE_UNAVAILABLE));
- } else if (continue_url == gaia_urls->oauth_get_access_token_url()) {
- consumer_->OnOAuthGetAccessTokenFailure(GoogleServiceAuthError(
- GoogleServiceAuthError::SERVICE_UNAVAILABLE));
- } else if (continue_url == gaia_urls->oauth_wrap_bridge_url()) {
- consumer_->OnOAuthWrapBridgeFailure(service_scope_,
- GoogleServiceAuthError(
- GoogleServiceAuthError::SERVICE_UNAVAILABLE));
- } else if (continue_url == gaia_urls->oauth_user_info_url()) {
- consumer_->OnUserInfoFailure(GoogleServiceAuthError(
- GoogleServiceAuthError::SERVICE_UNAVAILABLE));
- } else if (StartsWithASCII(continue_url,
- gaia_urls->oauth_revoke_token_url(),
- true)) {
- consumer_->OnOAuthRevokeTokenFailure(GoogleServiceAuthError(
- GoogleServiceAuthError::SERVICE_UNAVAILABLE));
- } else {
- NOTREACHED();
- }
- } else {
- NOTREACHED() << "GaiaOAuthFetcher unknown url=" << url.spec();
- }
+ NOTREACHED();
}
}
« no previous file with comments | « chrome/browser/net/browser_url_util_unittest.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698