diff options
author | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-18 20:12:18 +0000 |
---|---|---|
committer | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-18 20:12:18 +0000 |
commit | ac39d7af11cb63211ed54225a559c2b628e57674 (patch) | |
tree | 486002eb77548c8eb94c05a11acda470e016e1ac /chrome/browser | |
parent | 6fdb043493c52b69e8fa2690c0e175866d142323 (diff) | |
download | chromium_src-ac39d7af11cb63211ed54225a559c2b628e57674.zip chromium_src-ac39d7af11cb63211ed54225a559c2b628e57674.tar.gz chromium_src-ac39d7af11cb63211ed54225a559c2b628e57674.tar.bz2 |
Reverted 136345 - Ran into GAIA dosserver issues in prod for http://accounts.google.com. We are going back to http://www.google.com/accounts/... for all API calls.
BUG=127147
TEST=all serivices dependent on GAIA auth should still work (sync, login, policy, drive...)
Review URL: https://chromiumcodereview.appspot.com/10411025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
12 files changed, 43 insertions, 21 deletions
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc index efa7645..6042088 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.cc +++ b/chrome/browser/chromeos/login/existing_user_controller.cc @@ -84,7 +84,7 @@ const char kGetStartedInitialLocaleParam[] = "initial_locale"; // URL for account creation. const char kCreateAccountURL[] = - "https://accounts.google.com/NewAccount?service=mail"; + "https://www.google.com/accounts/NewAccount?service=mail"; // ChromeVox tutorial URL (used in place of "getting started" url when // accessibility is enabled). diff --git a/chrome/browser/chromeos/login/mock_url_fetchers.cc b/chrome/browser/chromeos/login/mock_url_fetchers.cc index 440d827..5795f59 100644 --- a/chrome/browser/chromeos/login/mock_url_fetchers.cc +++ b/chrome/browser/chromeos/login/mock_url_fetchers.cc @@ -100,7 +100,7 @@ void FailFetcher::Start() { // static const char CaptchaFetcher::kCaptchaToken[] = "token"; // static -const char CaptchaFetcher::kCaptchaUrlBase[] = "http://accounts.google.com/"; +const char CaptchaFetcher::kCaptchaUrlBase[] = "http://www.google.com/accounts/"; // static const char CaptchaFetcher::kCaptchaUrlFragment[] = "fragment"; // static diff --git a/chrome/browser/chromeos/login/online_attempt_unittest.cc b/chrome/browser/chromeos/login/online_attempt_unittest.cc index 1586ef9..fb098b7 100644 --- a/chrome/browser/chromeos/login/online_attempt_unittest.cc +++ b/chrome/browser/chromeos/login/online_attempt_unittest.cc @@ -22,11 +22,11 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +using content::BrowserThread; using ::testing::AnyNumber; using ::testing::Invoke; using ::testing::Return; using ::testing::_; -using content::BrowserThread; namespace chromeos { @@ -248,7 +248,7 @@ TEST_F(OnlineAttemptTest, CaptchaErrorOutputted) { GoogleServiceAuthError auth_error = GoogleServiceAuthError::FromClientLoginCaptchaChallenge( "CCTOKEN", - GURL("http://accounts.google.com/Captcha?ctoken=CCTOKEN"), + GURL("http://www.google.com/accounts/Captcha?ctoken=CCTOKEN"), GURL("http://www.google.com/login/captcha")); RunFailureTest(auth_error); } diff --git a/chrome/browser/importer/importer_host.cc b/chrome/browser/importer/importer_host.cc index 3b0a34c..2fd61a0 100644 --- a/chrome/browser/importer/importer_host.cc +++ b/chrome/browser/importer/importer_host.cc @@ -161,7 +161,7 @@ void ImporterHost::OnGoogleGAIACookieChecked(bool result) { l10n_util::GetStringUTF16(IDS_IMPORTER_GOOGLE_LOGIN_TEXT), string16(), browser::MESSAGE_BOX_TYPE_INFORMATION); - GURL url("https://accounts.google.com/ServiceLogin"); + GURL url("https://www.google.com/accounts/ServiceLogin"); DCHECK(profile_); Browser* browser = browser::FindLastActiveWithProfile(profile_); if (browser) diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc index 580bb6d..e9b1364a 100644 --- a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc +++ b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc @@ -22,7 +22,6 @@ #include "chrome/common/net/gaia/gaia_urls.h" #include "chrome/common/net/gaia/google_service_auth_error.h" #include "chrome/common/net/gaia/oauth_request_signer.h" -#include "chrome/common/net/url_util.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_source.h" #include "content/public/common/referrer.h" diff --git a/chrome/browser/password_manager/login_database_unittest.cc b/chrome/browser/password_manager/login_database_unittest.cc index c879f0a..2660c56 100644 --- a/chrome/browser/password_manager/login_database_unittest.cc +++ b/chrome/browser/password_manager/login_database_unittest.cc @@ -47,8 +47,8 @@ TEST_F(LoginDatabaseTest, Logins) { // Example password form. PasswordForm form; - form.origin = GURL("http://accounts.google.com/LoginAuth"); - form.action = GURL("http://accounts.google.com/Login"); + form.origin = GURL("http://www.google.com/accounts/LoginAuth"); + form.action = GURL("http://www.google.com/accounts/Login"); form.username_element = ASCIIToUTF16("Email"); form.username_value = ASCIIToUTF16("test@gmail.com"); form.password_element = ASCIIToUTF16("Passwd"); @@ -255,8 +255,8 @@ TEST_F(LoginDatabaseTest, BlacklistedLogins) { // Save a form as blacklisted. PasswordForm form; - form.origin = GURL("http://accounts.google.com/LoginAuth"); - form.action = GURL("http://accounts.google.com/Login"); + form.origin = GURL("http://www.google.com/accounts/LoginAuth"); + form.action = GURL("http://www.google.com/accounts/Login"); form.username_element = ASCIIToUTF16("Email"); form.password_element = ASCIIToUTF16("Passwd"); form.submit_element = ASCIIToUTF16("signIn"); diff --git a/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc b/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc index 9398bf8..38cdf43 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc +++ b/chrome/browser/printing/cloud_print/cloud_print_setup_source.cc @@ -25,7 +25,7 @@ const char CloudPrintSetupSource::kInvalidPasswordHelpUrl[] = const char CloudPrintSetupSource::kCanNotAccessAccountUrl[] = "https://www.google.com/support/accounts/bin/answer.py?answer=48598"; const char CloudPrintSetupSource::kCreateNewAccountUrl[] = - "https://accounts.google.com/NewAccount?service=chromiumsync"; + "https://www.google.com/accounts/NewAccount?service=chromiumsync"; namespace { diff --git a/chrome/browser/printing/cloud_print/cloud_print_url.cc b/chrome/browser/printing/cloud_print/cloud_print_url.cc index 7a41028..b22880d 100644 --- a/chrome/browser/printing/cloud_print/cloud_print_url.cc +++ b/chrome/browser/printing/cloud_print/cloud_print_url.cc @@ -16,7 +16,7 @@ const char kDefaultCloudPrintServiceURL[] = "https://www.google.com/cloudprint"; const char kDefaultCloudPrintSigninURL[] = - "https://accounts.google.com/ServiceLogin?" + "https://www.google.com/accounts/ServiceLogin?" "service=cloudprint&continue=https%3A%2F%2Fwww.google.com%2Fcloudprint"; const char kLearnMoreURL[] = diff --git a/chrome/browser/resources/chromeos/gaia_auth/manifest.json b/chrome/browser/resources/chromeos/gaia_auth/manifest.json index c3b48f8..4ce6d59 100644 --- a/chrome/browser/resources/chromeos/gaia_auth/manifest.json +++ b/chrome/browser/resources/chromeos/gaia_auth/manifest.json @@ -4,7 +4,7 @@ "name": "GaiaAuthExtension", "version": "0.0.1", "manifest_version": 2, - "content_security_policy": "default-src 'self'; script-src 'self'; frame-src 'self' https://accounts.google.com", + "content_security_policy": "default-src 'self'; script-src 'self'; frame-src 'self' https://www.google.com/ https://www.google.com/accounts/", "description": "GAIA Component Extension", "web_accessible_resources": [ "main.css", diff --git a/chrome/browser/resources/chromeos/gaia_auth/manifest_test.json b/chrome/browser/resources/chromeos/gaia_auth/manifest_test.json index c5228f7..b86091c 100644 --- a/chrome/browser/resources/chromeos/gaia_auth/manifest_test.json +++ b/chrome/browser/resources/chromeos/gaia_auth/manifest_test.json @@ -33,7 +33,6 @@ "permissions": [ "https://insecure.com/*", "https://www.google.com/accounts/*", - "https://accounts.google.com/*", "https://gaiastaging.corp.google.com/*", "chrome://oobe/" ] diff --git a/chrome/browser/sync/resources/gaia_login_test.html b/chrome/browser/sync/resources/gaia_login_test.html index c3b5875..fe50af6 100644 --- a/chrome/browser/sync/resources/gaia_login_test.html +++ b/chrome/browser/sync/resources/gaia_login_test.html @@ -46,7 +46,7 @@ function set_up_testing() { return { error: get_selected_value(form.error), user: "homer@gmail.com", - captchaUrl: "https://accounts.google.com/Captcha" + captchaUrl: "https://www.google.com/accounts/Captcha" }; }; diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc index f269484..9e26010 100644 --- a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc +++ b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc @@ -25,7 +25,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" -#include "chrome/common/net/url_util.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" #include "googleurl/src/url_util.h" @@ -80,6 +79,29 @@ SyncPromoUIHTMLSource::SyncPromoUIHTMLSource(content::WebUI* web_ui) AddLocalizedStrings(localized_strings); } +// Looks for |search_key| in the query portion of |url|. Returns true if the +// key is found and sets |out_value| to the value for the key. Returns false if +// the key is not found. +bool GetValueForKeyInQuery(const GURL& url, const std::string& search_key, + std::string* out_value) { + url_parse::Component query = url.parsed_for_possibly_invalid_spec().query; + url_parse::Component key, value; + while (url_parse::ExtractQueryKeyValue( + url.spec().c_str(), &query, &key, &value)) { + if (key.is_nonempty()) { + std::string key_string = url.spec().substr(key.begin, key.len); + if (key_string == search_key) { + if (value.is_nonempty()) + *out_value = url.spec().substr(value.begin, value.len); + else + *out_value = ""; + return true; + } + } + } + return false; +} + } // namespace SyncPromoUI::SyncPromoUI(content::WebUI* web_ui) : WebUIController(web_ui) { @@ -226,9 +248,12 @@ GURL SyncPromoUI::GetSyncPromoURL(const GURL& next_page, Source source) { // static GURL SyncPromoUI::GetNextPageURLForSyncPromoURL(const GURL& url) { std::string value; - if (chrome_common_net::GetValueForKeyInQuery( - url, kSyncPromoQueryKeyNextPage, &value)) { - return GURL(value); + if (GetValueForKeyInQuery(url, kSyncPromoQueryKeyNextPage, &value)) { + url_canon::RawCanonOutputT<char16> output; + url_util::DecodeURLEscapeSequences(value.c_str(), value.length(), &output); + std::string url; + UTF16ToUTF8(output.data(), output.length(), &url); + return GURL(url); } return GURL(); } @@ -236,8 +261,7 @@ GURL SyncPromoUI::GetNextPageURLForSyncPromoURL(const GURL& url) { // static SyncPromoUI::Source SyncPromoUI::GetSourceForSyncPromoURL(const GURL& url) { std::string value; - if (chrome_common_net::GetValueForKeyInQuery( - url, kSyncPromoQueryKeySource, &value)) { + if (GetValueForKeyInQuery(url, kSyncPromoQueryKeySource, &value)) { int source = 0; if (base::StringToInt(value, &source) && source >= SOURCE_START_PAGE && source < SOURCE_UNKNOWN) { |