diff options
Diffstat (limited to 'chrome/browser')
12 files changed, 21 insertions, 43 deletions
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc index 6042088..efa7645 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://www.google.com/accounts/NewAccount?service=mail"; + "https://accounts.google.com/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 5795f59..440d827 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://www.google.com/accounts/"; +const char CaptchaFetcher::kCaptchaUrlBase[] = "http://accounts.google.com/"; // 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 fb098b7..1586ef9 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://www.google.com/accounts/Captcha?ctoken=CCTOKEN"), + GURL("http://accounts.google.com/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 2fd61a0..3b0a34c 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://www.google.com/accounts/ServiceLogin"); + GURL url("https://accounts.google.com/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 e9b1364a..580bb6d 100644 --- a/chrome/browser/net/gaia/gaia_oauth_fetcher.cc +++ b/chrome/browser/net/gaia/gaia_oauth_fetcher.cc @@ -22,6 +22,7 @@ #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 2660c56..c879f0a 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://www.google.com/accounts/LoginAuth"); - form.action = GURL("http://www.google.com/accounts/Login"); + form.origin = GURL("http://accounts.google.com/LoginAuth"); + form.action = GURL("http://accounts.google.com/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://www.google.com/accounts/LoginAuth"); - form.action = GURL("http://www.google.com/accounts/Login"); + form.origin = GURL("http://accounts.google.com/LoginAuth"); + form.action = GURL("http://accounts.google.com/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 38cdf43..9398bf8 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://www.google.com/accounts/NewAccount?service=chromiumsync"; + "https://accounts.google.com/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 b22880d..7a41028 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://www.google.com/accounts/ServiceLogin?" + "https://accounts.google.com/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 4ce6d59..c3b48f8 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://www.google.com/ https://www.google.com/accounts/", + "content_security_policy": "default-src 'self'; script-src 'self'; frame-src 'self' https://accounts.google.com", "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 b86091c..c5228f7 100644 --- a/chrome/browser/resources/chromeos/gaia_auth/manifest_test.json +++ b/chrome/browser/resources/chromeos/gaia_auth/manifest_test.json @@ -33,6 +33,7 @@ "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 fe50af6..c3b5875 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://www.google.com/accounts/Captcha" + captchaUrl: "https://accounts.google.com/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 9e26010..f269484 100644 --- a/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc +++ b/chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc @@ -25,6 +25,7 @@ #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" @@ -79,29 +80,6 @@ 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) { @@ -248,12 +226,9 @@ GURL SyncPromoUI::GetSyncPromoURL(const GURL& next_page, Source source) { // static GURL SyncPromoUI::GetNextPageURLForSyncPromoURL(const GURL& url) { std::string 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); + if (chrome_common_net::GetValueForKeyInQuery( + url, kSyncPromoQueryKeyNextPage, &value)) { + return GURL(value); } return GURL(); } @@ -261,7 +236,8 @@ GURL SyncPromoUI::GetNextPageURLForSyncPromoURL(const GURL& url) { // static SyncPromoUI::Source SyncPromoUI::GetSourceForSyncPromoURL(const GURL& url) { std::string value; - if (GetValueForKeyInQuery(url, kSyncPromoQueryKeySource, &value)) { + if (chrome_common_net::GetValueForKeyInQuery( + url, kSyncPromoQueryKeySource, &value)) { int source = 0; if (base::StringToInt(value, &source) && source >= SOURCE_START_PAGE && source < SOURCE_UNKNOWN) { |