diff options
author | blundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-08 11:47:58 +0000 |
---|---|---|
committer | blundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-08 11:47:58 +0000 |
commit | a1fcc1d501e1e8e85d97795c1c450f5325a82614 (patch) | |
tree | bd2dac696cfe6a2368bd7ae9f1871f3535b2ad18 | |
parent | 9d51882d2222c2bf221d3ba4449be7916ebf39fc (diff) | |
download | chromium_src-a1fcc1d501e1e8e85d97795c1c450f5325a82614.zip chromium_src-a1fcc1d501e1e8e85d97795c1c450f5325a82614.tar.gz chromium_src-a1fcc1d501e1e8e85d97795c1c450f5325a82614.tar.bz2 |
Componentize GoogleURLTracker(InfoBarDelegate,MapEntry,NavHelper)
This CL moves GoogleURLTracker and associated friends to the Google component.
It additionally moves strings that GoogleURLTrackerInfoBarDelegate into
components_strings.grd (via google_strings.grdp).
Dependencies of this code on google_util are temporarily punched through the
embedder, as google_util will require more time to componentize. Once
google_util is componentized, the indirection through the embedder will be
removed.
BUG=373209,373222
TBR=thakis, cbentzel
Review URL: https://codereview.chromium.org/316203003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275743 0039d316-1c4b-4281-b951-d872f2087c98
45 files changed, 181 insertions, 91 deletions
diff --git a/build/ios/grit_whitelist.txt b/build/ios/grit_whitelist.txt index ad9f0a8..acbc400 100644 --- a/build/ios/grit_whitelist.txt +++ b/build/ios/grit_whitelist.txt @@ -543,6 +543,7 @@ IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED IDS_GOOGLE_URL_TRACKER_INFOBAR_DONT_SWITCH +IDS_GOOGLE_URL_TRACKER_INFOBAR_LEARN_MORE IDS_GOOGLE_URL_TRACKER_INFOBAR_MESSAGE IDS_GOOGLE_URL_TRACKER_INFOBAR_SWITCH IDS_GROUP_BY_DOMAIN_LABEL diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index d081c82..b6ef606 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -12952,17 +12952,6 @@ Some features may be unavailable. Please check that the profile exists and you </message> </if> - <!-- GoogleURL tracker info bar --> - <message name="IDS_GOOGLE_URL_TRACKER_INFOBAR_MESSAGE" desc="Message displayed when the user's current Google TLD doesn't match the default for their location. This can be shortened in other languages (e.g. by removing 'would you like to') as needed to keep the translated strings from being much longer than English, so the infobar can still display all three IDS_GOOGLE_URL_TRACKER_ strings and a 'Learn more' link."> - Would you like to search with <ph name="NEW_GOOGLE_HOST">$1<ex>google.de</ex></ph> instead of <ph name="CURRENT_GOOGLE_HOST">$2<ex>google.fr</ex></ph>? - </message> - <message name="IDS_GOOGLE_URL_TRACKER_INFOBAR_SWITCH" desc="Button text for button that changes user's default Google TLD to a new TLD."> - Switch to <ph name="NEW_GOOGLE_HOST">$1<ex>google.de</ex></ph> - </message> - <message name="IDS_GOOGLE_URL_TRACKER_INFOBAR_DONT_SWITCH" desc="Button text for button that leaves user's default Google TLD unchanged."> - Keep using <ph name="CURRENT_GOOGLE_HOST">$1<ex>google.fr</ex></ph> - </message> - <message name="IDS_IMAGE_FILES" desc="The description of the image file extensions in the select file dialog."> Image Files </message> diff --git a/chrome/browser/android/logo_service.cc b/chrome/browser/android/logo_service.cc index ed44ac1..c3ef401 100644 --- a/chrome/browser/android/logo_service.cc +++ b/chrome/browser/android/logo_service.cc @@ -6,12 +6,12 @@ #include "base/memory/weak_ptr.h" #include "chrome/browser/google/google_profile_helper.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/google/google_util.h" #include "chrome/browser/image_decoder.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_service_factory.h" +#include "components/google/core/browser/google_url_tracker.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/search_provider_logos/google_logo_api.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc index 932fdb8..bb80a5c 100644 --- a/chrome/browser/android/tab_android.cc +++ b/chrome/browser/android/tab_android.cc @@ -12,7 +12,6 @@ #include "chrome/browser/browser_about_handler.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/content_settings/tab_specific_content_settings.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/google/google_url_tracker_factory.h" #include "chrome/browser/google/google_util.h" #include "chrome/browser/infobars/infobar_service.h" @@ -38,6 +37,7 @@ #include "chrome/browser/ui/toolbar/toolbar_model_impl.h" #include "chrome/common/net/url_fixer_upper.h" #include "chrome/common/url_constants.h" +#include "components/google/core/browser/google_url_tracker.h" #include "components/infobars/core/infobar_container.h" #include "content/public/browser/android/content_view_core.h" #include "content/public/browser/navigation_entry.h" diff --git a/chrome/browser/chromeos/customization_wallpaper_downloader_browsertest.cc b/chrome/browser/chromeos/customization_wallpaper_downloader_browsertest.cc index 5fae46e..a81eb06 100644 --- a/chrome/browser/chromeos/customization_wallpaper_downloader_browsertest.cc +++ b/chrome/browser/chromeos/customization_wallpaper_downloader_browsertest.cc @@ -15,10 +15,10 @@ #include "chrome/browser/chromeos/customization_wallpaper_downloader.h" #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_test_utils.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/testing_browser_process.h" #include "chromeos/chromeos_switches.h" +#include "components/google/core/browser/google_url_tracker.h" #include "net/http/http_response_headers.h" #include "net/http/http_status_code.h" #include "net/url_request/test_url_fetcher_factory.h" diff --git a/chrome/browser/google/chrome_google_url_tracker_client.cc b/chrome/browser/google/chrome_google_url_tracker_client.cc index 85278ab..5f48e00 100644 --- a/chrome/browser/google/chrome_google_url_tracker_client.cc +++ b/chrome/browser/google/chrome_google_url_tracker_client.cc @@ -6,11 +6,12 @@ #include "base/command_line.h" #include "chrome/browser/chrome_notification_types.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/google/google_url_tracker_navigation_helper_impl.h" +#include "chrome/browser/google/google_util.h" #include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/chrome_switches.h" +#include "components/google/core/browser/google_url_tracker.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/notification_service.h" @@ -58,6 +59,17 @@ ChromeGoogleURLTrackerClient::GetRequestContext() { return profile_->GetRequestContext(); } +bool ChromeGoogleURLTrackerClient::IsGoogleDomainURL(const GURL& url) { + return google_util::IsGoogleDomainUrl( + url, + google_util::DISALLOW_SUBDOMAIN, + google_util::DISALLOW_NON_STANDARD_PORTS); +} + +GURL ChromeGoogleURLTrackerClient::AppendGoogleLocaleParam(const GURL& url) { + return google_util::AppendGoogleLocaleParam(url); +} + void ChromeGoogleURLTrackerClient::Observe( int type, const content::NotificationSource& source, diff --git a/chrome/browser/google/chrome_google_url_tracker_client.h b/chrome/browser/google/chrome_google_url_tracker_client.h index 08a4e2e..3c166fe 100644 --- a/chrome/browser/google/chrome_google_url_tracker_client.h +++ b/chrome/browser/google/chrome_google_url_tracker_client.h @@ -23,6 +23,8 @@ class ChromeGoogleURLTrackerClient : public GoogleURLTrackerClient, virtual bool IsBackgroundNetworkingEnabled() OVERRIDE; virtual PrefService* GetPrefs() OVERRIDE; virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; + virtual bool IsGoogleDomainURL(const GURL& url) OVERRIDE; + virtual GURL AppendGoogleLocaleParam(const GURL& url) OVERRIDE; private: // content::NotificationObserver: diff --git a/chrome/browser/google/google_profile_helper.cc b/chrome/browser/google/google_profile_helper.cc index 0098275..3f0b962 100644 --- a/chrome/browser/google/google_profile_helper.cc +++ b/chrome/browser/google/google_profile_helper.cc @@ -4,9 +4,9 @@ #include "chrome/browser/google/google_profile_helper.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/google/google_url_tracker_factory.h" #include "chrome/browser/google/google_util.h" +#include "components/google/core/browser/google_url_tracker.h" #include "url/gurl.h" namespace google_profile_helper { diff --git a/chrome/browser/google/google_url_tracker_factory.cc b/chrome/browser/google/google_url_tracker_factory.cc index be20187..bc6eb06 100644 --- a/chrome/browser/google/google_url_tracker_factory.cc +++ b/chrome/browser/google/google_url_tracker_factory.cc @@ -6,10 +6,10 @@ #include "base/prefs/pref_service.h" #include "chrome/browser/google/chrome_google_url_tracker_client.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" #include "components/google/core/browser/google_pref_names.h" +#include "components/google/core/browser/google_url_tracker.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/pref_registry/pref_registry_syncable.h" diff --git a/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc b/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc index 29bfd58..b61d027 100644 --- a/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc +++ b/chrome/browser/google/google_url_tracker_navigation_helper_impl.cc @@ -5,8 +5,8 @@ #include "chrome/browser/google/google_url_tracker_navigation_helper_impl.h" #include "chrome/browser/chrome_notification_types.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/infobars/infobar_service.h" +#include "components/google/core/browser/google_url_tracker.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/browser/google/google_url_tracker_navigation_helper_impl.h b/chrome/browser/google/google_url_tracker_navigation_helper_impl.h index a86d2d3..f1dba45 100644 --- a/chrome/browser/google/google_url_tracker_navigation_helper_impl.h +++ b/chrome/browser/google/google_url_tracker_navigation_helper_impl.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_IMPL_H_ #define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_IMPL_H_ -#include "chrome/browser/google/google_url_tracker_navigation_helper.h" +#include "components/google/core/browser/google_url_tracker_navigation_helper.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "url/gurl.h" diff --git a/chrome/browser/google/google_url_tracker_unittest.cc b/chrome/browser/google/google_url_tracker_unittest.cc index 59ac6c0..f4b5503 100644 --- a/chrome/browser/google/google_url_tracker_unittest.cc +++ b/chrome/browser/google/google_url_tracker_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/google/google_url_tracker.h" +#include "components/google/core/browser/google_url_tracker.h" #include <set> #include <string> @@ -11,11 +11,12 @@ #include "base/message_loop/message_loop.h" #include "base/prefs/pref_service.h" #include "chrome/browser/google/google_url_tracker_factory.h" -#include "chrome/browser/google/google_url_tracker_infobar_delegate.h" -#include "chrome/browser/google/google_url_tracker_navigation_helper.h" +#include "chrome/browser/google/google_util.h" #include "chrome/test/base/testing_profile.h" #include "components/google/core/browser/google_pref_names.h" #include "components/google/core/browser/google_url_tracker_client.h" +#include "components/google/core/browser/google_url_tracker_infobar_delegate.h" +#include "components/google/core/browser/google_url_tracker_navigation_helper.h" #include "components/infobars/core/infobar.h" #include "components/infobars/core/infobar_delegate.h" #include "content/public/test/test_browser_thread_bundle.h" @@ -79,6 +80,8 @@ class TestGoogleURLTrackerClient : public GoogleURLTrackerClient { virtual bool IsBackgroundNetworkingEnabled() OVERRIDE; virtual PrefService* GetPrefs() OVERRIDE; virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; + virtual bool IsGoogleDomainURL(const GURL& url) OVERRIDE; + virtual GURL AppendGoogleLocaleParam(const GURL& url) OVERRIDE; private: Profile* profile_; @@ -115,6 +118,18 @@ net::URLRequestContextGetter* TestGoogleURLTrackerClient::GetRequestContext() { return profile_->GetRequestContext(); } +bool TestGoogleURLTrackerClient::IsGoogleDomainURL(const GURL& url) { + return google_util::IsGoogleDomainUrl( + url, + google_util::DISALLOW_SUBDOMAIN, + google_util::DISALLOW_NON_STANDARD_PORTS); +} + +GURL TestGoogleURLTrackerClient::AppendGoogleLocaleParam(const GURL& url) { + return google_util::AppendGoogleLocaleParam(url); +} + + // TestGoogleURLTrackerNavigationHelper --------------------------------------- class TestGoogleURLTrackerNavigationHelper diff --git a/chrome/browser/google/google_util.cc b/chrome/browser/google/google_util.cc index 9b587dd..dead358 100644 --- a/chrome/browser/google/google_util.cc +++ b/chrome/browser/google/google_util.cc @@ -16,6 +16,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/common/net/url_fixer_upper.h" #include "components/google/core/browser/google_switches.h" +#include "components/google/core/browser/google_url_tracker.h" #include "net/base/registry_controlled_domains/registry_controlled_domain.h" #include "net/base/url_util.h" #include "url/gurl.h" diff --git a/chrome/browser/google/google_util_unittest.cc b/chrome/browser/google/google_util_unittest.cc index 8b8b99b..7ff06bc 100644 --- a/chrome/browser/google/google_util_unittest.cc +++ b/chrome/browser/google/google_util_unittest.cc @@ -3,9 +3,9 @@ // found in the LICENSE file. #include "base/command_line.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/google/google_util.h" #include "components/google/core/browser/google_switches.h" +#include "components/google/core/browser/google_url_tracker.h" #include "testing/gtest/include/gtest/gtest.h" using google_util::IsGoogleDomainUrl; diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index 5ce2d06..898f126 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc @@ -25,7 +25,6 @@ #include "chrome/browser/external_protocol/external_protocol_handler.h" #include "chrome/browser/first_run/first_run.h" #include "chrome/browser/geolocation/geolocation_prefs.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/google/google_url_tracker_factory.h" #include "chrome/browser/gpu/gl_string_manager.h" #include "chrome/browser/gpu/gpu_mode_manager.h" @@ -85,6 +84,7 @@ #include "components/autofill/core/browser/autofill_manager.h" #include "components/bookmarks/browser/bookmark_utils.h" #include "components/google/core/browser/google_pref_names.h" +#include "components/google/core/browser/google_url_tracker.h" #include "components/network_time/network_time_tracker.h" #include "components/password_manager/core/browser/password_manager.h" #include "components/pref_registry/pref_registry_syncable.h" diff --git a/chrome/browser/profile_resetter/profile_resetter.cc b/chrome/browser/profile_resetter/profile_resetter.cc index 6dcb8cd..ab0bdb2 100644 --- a/chrome/browser/profile_resetter/profile_resetter.cc +++ b/chrome/browser/profile_resetter/profile_resetter.cc @@ -10,7 +10,6 @@ #include "chrome/browser/browsing_data/browsing_data_helper.h" #include "chrome/browser/content_settings/host_content_settings_map.h" #include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/google/google_url_tracker_factory.h" #include "chrome/browser/profile_resetter/brandcoded_default_settings.h" #include "chrome/browser/profiles/profile.h" @@ -24,6 +23,7 @@ #include "chrome/common/pref_names.h" #include "chrome/installer/util/browser_distribution.h" #include "components/google/core/browser/google_pref_names.h" +#include "components/google/core/browser/google_url_tracker.h" #include "content/public/browser/browser_thread.h" #include "extensions/browser/extension_system.h" #include "extensions/browser/management_policy.h" diff --git a/chrome/browser/search/instant_unittest_base.cc b/chrome/browser/search/instant_unittest_base.cc index cc37be9..e0b3fe0 100644 --- a/chrome/browser/search/instant_unittest_base.cc +++ b/chrome/browser/search/instant_unittest_base.cc @@ -3,11 +3,11 @@ // found in the LICENSE file. #include "chrome/browser/search/instant_unittest_base.h" + #include <string> #include "base/strings/utf_string_conversions.h" #include "chrome/browser/chrome_notification_types.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search/instant_service.h" #include "chrome/browser/search/instant_service_factory.h" @@ -21,6 +21,7 @@ #include "chrome/test/base/testing_pref_service_syncable.h" #include "chrome/test/base/ui_test_utils.h" #include "components/google/core/browser/google_pref_names.h" +#include "components/google/core/browser/google_url_tracker.h" #include "components/variations/entropy_provider.h" InstantUnitTestBase::InstantUnitTestBase() { diff --git a/chrome/browser/search_engines/search_provider_install_data.cc b/chrome/browser/search_engines/search_provider_install_data.cc index a40041a..159d073 100644 --- a/chrome/browser/search_engines/search_provider_install_data.cc +++ b/chrome/browser/search_engines/search_provider_install_data.cc @@ -14,7 +14,6 @@ #include "base/logging.h" #include "base/memory/ref_counted.h" #include "base/sequenced_task_runner_helpers.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/google/google_url_tracker_factory.h" #include "chrome/browser/search_engines/search_host_to_urls_map.h" #include "chrome/browser/search_engines/search_terms_data.h" @@ -22,6 +21,7 @@ #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/search_engines/util.h" +#include "components/google/core/browser/google_url_tracker.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_process_host_observer.h" diff --git a/chrome/browser/search_engines/search_terms_data.cc b/chrome/browser/search_engines/search_terms_data.cc index 68ec5c0..4cc019f 100644 --- a/chrome/browser/search_engines/search_terms_data.cc +++ b/chrome/browser/search_engines/search_terms_data.cc @@ -11,7 +11,6 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/google/google_brand.h" #include "chrome/browser/google/google_profile_helper.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/google/google_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/search/search.h" @@ -20,6 +19,7 @@ #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" +#include "components/google/core/browser/google_url_tracker.h" #include "content/public/browser/browser_thread.h" #include "sync/protocol/sync.pb.h" #include "url/gurl.h" diff --git a/chrome/browser/search_engines/template_url_service.h b/chrome/browser/search_engines/template_url_service.h index 0e4833c..c99bc88 100644 --- a/chrome/browser/search_engines/template_url_service.h +++ b/chrome/browser/search_engines/template_url_service.h @@ -16,10 +16,10 @@ #include "base/memory/scoped_ptr.h" #include "base/observer_list.h" #include "base/prefs/pref_change_registrar.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/search_engines/default_search_manager.h" #include "chrome/browser/search_engines/template_url_id.h" #include "chrome/browser/webdata/web_data_service.h" +#include "components/google/core/browser/google_url_tracker.h" #include "components/keyed_service/core/keyed_service.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" diff --git a/chrome/browser/search_engines/template_url_service_test_util.cc b/chrome/browser/search_engines/template_url_service_test_util.cc index 3259ff3..bcdbc42 100644 --- a/chrome/browser/search_engines/template_url_service_test_util.cc +++ b/chrome/browser/search_engines/template_url_service_test_util.cc @@ -8,7 +8,6 @@ #include "base/run_loop.h" #include "base/strings/string_split.h" #include "base/threading/thread.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/search_engines/default_search_manager.h" #include "chrome/browser/search_engines/search_terms_data.h" #include "chrome/browser/search_engines/template_url_service.h" @@ -16,6 +15,7 @@ #include "chrome/browser/webdata/web_data_service_factory.h" #include "chrome/test/base/testing_pref_service_syncable.h" #include "chrome/test/base/testing_profile.h" +#include "components/google/core/browser/google_url_tracker.h" #include "testing/gtest/include/gtest/gtest.h" #if defined(OS_CHROMEOS) diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc index 4b59c38..6a17ade 100644 --- a/chrome/browser/sync/test/integration/sync_test.cc +++ b/chrome/browser/sync/test/integration/sync_test.cc @@ -21,7 +21,6 @@ #include "base/threading/platform_thread.h" #include "base/values.h" #include "chrome/browser/bookmarks/bookmark_model_factory.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/invalidation/invalidation_service_factory.h" #include "chrome/browser/lifetime/application_lifetime.h" @@ -50,6 +49,7 @@ #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/ui_test_utils.h" #include "components/bookmarks/test/bookmark_test_helpers.h" +#include "components/google/core/browser/google_url_tracker.h" #include "components/invalidation/invalidation_switches.h" #include "components/invalidation/p2p_invalidation_service.h" #include "components/invalidation/p2p_invalidator.h" diff --git a/chrome/browser/ui/android/infobars/auto_login_prompter.cc b/chrome/browser/ui/android/infobars/auto_login_prompter.cc index 915fd40..c634e6f 100644 --- a/chrome/browser/ui/android/infobars/auto_login_prompter.cc +++ b/chrome/browser/ui/android/infobars/auto_login_prompter.cc @@ -8,7 +8,6 @@ #include "base/command_line.h" #include "base/logging.h" #include "base/prefs/pref_service.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" #include "chrome/browser/signin/signin_manager_factory.h" @@ -16,6 +15,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "components/auto_login_parser/auto_login_parser.h" +#include "components/google/core/browser/google_url_tracker.h" #include "components/signin/core/browser/profile_oauth2_token_service.h" #include "components/signin/core/browser/signin_manager.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index 2c07e91..93d45dd 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -56,7 +56,6 @@ #include "chrome/browser/favicon/favicon_tab_helper.h" #include "chrome/browser/file_select_helper.h" #include "chrome/browser/first_run/first_run.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/history/top_sites.h" #include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/infobars/simple_alert_infobar_delegate.h" @@ -150,6 +149,7 @@ #include "chrome/common/url_constants.h" #include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/browser/bookmark_utils.h" +#include "components/google/core/browser/google_url_tracker.h" #include "components/startup_metric_utils/startup_metric_utils.h" #include "components/web_modal/web_contents_modal_dialog_manager.h" #include "content/public/browser/devtools_manager.h" diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc index 07c50d3..ab2d763 100644 --- a/chrome/browser/ui/browser_navigator.cc +++ b/chrome/browser/ui/browser_navigator.cc @@ -13,7 +13,6 @@ #include "chrome/browser/browser_about_handler.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/extensions/tab_helper.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/prefs/incognito_mode_prefs.h" #include "chrome/browser/prerender/prerender_manager.h" #include "chrome/browser/prerender/prerender_manager_factory.h" @@ -34,6 +33,7 @@ #include "chrome/browser/web_applications/web_app.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" +#include "components/google/core/browser/google_url_tracker.h" #include "content/public/browser/browser_url_handler.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/browser/ui/navigation_correction_tab_observer.h b/chrome/browser/ui/navigation_correction_tab_observer.h index f3cb64d..1b0a9bf 100644 --- a/chrome/browser/ui/navigation_correction_tab_observer.h +++ b/chrome/browser/ui/navigation_correction_tab_observer.h @@ -6,7 +6,7 @@ #define CHROME_BROWSER_UI_NAVIGATION_CORRECTION_TAB_OBSERVER_H_ #include "base/prefs/pref_change_registrar.h" -#include "chrome/browser/google/google_url_tracker.h" +#include "components/google/core/browser/google_url_tracker.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc index ebb9876..2c52de1 100644 --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc @@ -27,7 +27,6 @@ #include "chrome/browser/command_updater.h" #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" #include "chrome/browser/favicon/favicon_tab_helper.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/google/google_url_tracker_factory.h" #include "chrome/browser/net/predictor.h" #include "chrome/browser/omnibox/omnibox_log.h" @@ -57,6 +56,7 @@ #include "chrome/common/net/url_fixer_upper.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" +#include "components/google/core/browser/google_url_tracker.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc index e6bd93a..fd52075 100644 --- a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc +++ b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc @@ -25,7 +25,6 @@ #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/favicon/favicon_tab_helper.h" -#include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/history/history_db_task.h" #include "chrome/browser/history/history_service.h" #include "chrome/browser/history/history_service_factory.h" @@ -59,6 +58,7 @@ #include "chrome/test/base/ui_test_utils.h" #include "components/bookmarks/browser/bookmark_utils.h" #include "components/bookmarks/test/bookmark_test_helpers.h" +#include "components/google/core/browser/google_url_tracker.h" #include "components/sessions/serialized_navigation_entry.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 0b3c14d..25d210c 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -703,16 +703,8 @@ 'browser/google/google_update_settings_posix.cc', 'browser/google/google_update_win.cc', 'browser/google/google_update_win.h', - 'browser/google/google_url_tracker.cc', - 'browser/google/google_url_tracker.h', 'browser/google/google_url_tracker_factory.cc', 'browser/google/google_url_tracker_factory.h', - 'browser/google/google_url_tracker_infobar_delegate.cc', - 'browser/google/google_url_tracker_infobar_delegate.h', - 'browser/google/google_url_tracker_map_entry.cc', - 'browser/google/google_url_tracker_map_entry.h', - 'browser/google/google_url_tracker_navigation_helper.cc', - 'browser/google/google_url_tracker_navigation_helper.h', 'browser/google/google_url_tracker_navigation_helper_impl.cc', 'browser/google/google_url_tracker_navigation_helper_impl.h', 'browser/google/google_brand.cc', diff --git a/chrome/common/net/chrome_url_fixer_client.cc b/chrome/common/net/chrome_url_fixer_client.cc new file mode 100644 index 0000000..97b5462 --- /dev/null +++ b/chrome/common/net/chrome_url_fixer_client.cc @@ -0,0 +1,11 @@ +// Copyright 2014 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. + +#include "chrome/common/net/chrome_url_fixer_client.h" + +ChromeURLFixerClient::ChromeURLFixerClient() { +} + +ChromeURLFixerClient::~ChromeURLFixerClient() { +} diff --git a/chrome/common/net/chrome_url_fixer_client.h b/chrome/common/net/chrome_url_fixer_client.h new file mode 100644 index 0000000..03e8bfe --- /dev/null +++ b/chrome/common/net/chrome_url_fixer_client.h @@ -0,0 +1,18 @@ +// Copyright 2014 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. + +#ifndef CHROME_COMMON_NET_CHROME_URL_FIXER_CLIENT_H_ +#define CHROME_COMMON_NET_CHROME_URL_FIXER_CLIENT_H_ + +#include "base/basictypes.h" +#include "chrome/common/net/url_fixer_client.h" + +// Chrome-specific implementation of URLFixerClient. +class ChromeURLFixerClient : public URLFixerClient { + public: + ChromeURLFixerClient(); + virtual ~ChromeURLFixerClient(); +}; + +#endif // CHROME_COMMON_NET_CHROME_URL_FIXER_CLIENT_H_ diff --git a/components/components_strings.grd b/components/components_strings.grd index 7aeac7b..b09e601 100644 --- a/components/components_strings.grd +++ b/components/components_strings.grd @@ -170,6 +170,7 @@ <part file="autofill_strings.grdp" /> <part file="bookmarks_strings.grdp" /> <part file="dom_distiller_strings.grdp" /> + <part file="google_strings.grdp" /> <part file="policy_strings.grdp" /> <part file="translate_strings.grdp" /> </messages> diff --git a/components/google.gypi b/components/google.gypi index 676fe81..588ac4b 100644 --- a/components/google.gypi +++ b/components/google.gypi @@ -9,6 +9,12 @@ 'type': 'static_library', 'dependencies': [ '../base/base.gyp:base', + '../net/net.gyp:net', + '../ui/base/ui_base.gyp:ui_base', + '../url/url.gyp:url_lib', + 'components_strings.gyp:components_strings', + 'keyed_service_core', + 'infobars_core', ], 'include_dirs': [ '..', @@ -20,9 +26,19 @@ 'google/core/browser/google_search_metrics.h', 'google/core/browser/google_switches.cc', 'google/core/browser/google_switches.h', + 'google/core/browser/google_url_tracker.cc', + 'google/core/browser/google_url_tracker.h', 'google/core/browser/google_url_tracker_client.cc', 'google/core/browser/google_url_tracker_client.h', + 'google/core/browser/google_url_tracker_infobar_delegate.cc', + 'google/core/browser/google_url_tracker_infobar_delegate.h', + 'google/core/browser/google_url_tracker_map_entry.cc', + 'google/core/browser/google_url_tracker_map_entry.h', + 'google/core/browser/google_url_tracker_navigation_helper.cc', + 'google/core/browser/google_url_tracker_navigation_helper.h', ], + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + 'msvs_disabled_warnings': [4267, ], }, ], } diff --git a/components/google/DEPS b/components/google/DEPS new file mode 100644 index 0000000..56e2a6c --- /dev/null +++ b/components/google/DEPS @@ -0,0 +1,5 @@ +include_rules = [ + "+grit", + "+net", + "+ui", +] diff --git a/components/google/core/browser/DEPS b/components/google/core/browser/DEPS new file mode 100644 index 0000000..91670bd --- /dev/null +++ b/components/google/core/browser/DEPS @@ -0,0 +1,4 @@ +include_rules = [ + "+components/infobars/core", + "+components/keyed_service/core", +] diff --git a/chrome/browser/google/google_url_tracker.cc b/components/google/core/browser/google_url_tracker.cc index 77cdaad..cf0e5cb 100644 --- a/chrome/browser/google/google_url_tracker.cc +++ b/components/google/core/browser/google_url_tracker.cc @@ -1,25 +1,19 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 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. -#include "chrome/browser/google/google_url_tracker.h" +#include "components/google/core/browser/google_url_tracker.h" #include "base/bind.h" #include "base/command_line.h" #include "base/prefs/pref_service.h" #include "base/strings/string_util.h" -#include "chrome/browser/chrome_notification_types.h" -#include "chrome/browser/google/google_url_tracker_factory.h" -#include "chrome/browser/google/google_url_tracker_infobar_delegate.h" -#include "chrome/browser/google/google_url_tracker_navigation_helper.h" -#include "chrome/browser/google/google_util.h" -#include "chrome/common/pref_names.h" #include "components/google/core/browser/google_pref_names.h" #include "components/google/core/browser/google_switches.h" -#include "components/google/core/browser/google_url_tracker_client.h" +#include "components/google/core/browser/google_url_tracker_infobar_delegate.h" +#include "components/google/core/browser/google_url_tracker_navigation_helper.h" #include "components/infobars/core/infobar.h" #include "components/infobars/core/infobar_manager.h" -#include "content/public/browser/notification_service.h" #include "net/base/load_flags.h" #include "net/base/net_util.h" #include "net/url_request/url_fetcher.h" @@ -54,7 +48,7 @@ GoogleURLTracker::GoogleURLTracker(scoped_ptr<GoogleURLTrackerClient> client, // browser is starting up, and if so, come back later", but there is currently // no function to do this. // - // In UNIT_TEST mode, where we want to explicitly control when the tracker + // In UNIT_TEST_MODE, where we want to explicitly control when the tracker // "wakes up", we do nothing at all. if (mode == NORMAL_MODE) { static const int kStartFetchDelayMS = 5000; @@ -128,8 +122,7 @@ void GoogleURLTracker::OnURLFetchComplete(const net::URLFetcher* source) { GURL url(url_str); if (!url.is_valid() || (url.path().length() > 1) || url.has_query() || url.has_ref() || - !google_util::IsGoogleDomainUrl(url, google_util::DISALLOW_SUBDOMAIN, - google_util::DISALLOW_NON_STANDARD_PORTS)) + !client_->IsGoogleDomainURL(url)) return; std::swap(url, fetched_google_url_); diff --git a/chrome/browser/google/google_url_tracker.h b/components/google/core/browser/google_url_tracker.h index c87a83f..dc9f13d 100644 --- a/chrome/browser/google/google_url_tracker.h +++ b/components/google/core/browser/google_url_tracker.h @@ -1,9 +1,9 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 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. -#ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ -#define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ +#ifndef COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_ +#define COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_ #include <map> #include <string> @@ -14,14 +14,14 @@ #include "base/gtest_prod_util.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/google/google_url_tracker_map_entry.h" +#include "components/google/core/browser/google_url_tracker_client.h" +#include "components/google/core/browser/google_url_tracker_map_entry.h" #include "components/keyed_service/core/keyed_service.h" #include "net/base/network_change_notifier.h" #include "net/url_request/url_fetcher.h" #include "net/url_request/url_fetcher_delegate.h" #include "url/gurl.h" -class GoogleURLTrackerClient; class GoogleURLTrackerNavigationHelper; class PrefService; @@ -86,6 +86,7 @@ class GoogleURLTracker : public net::URLFetcherDelegate, void AcceptGoogleURL(bool redo_searches); void CancelGoogleURL(); const GURL& fetched_google_url() const { return fetched_google_url_; } + GoogleURLTrackerClient* client() { return client_.get(); } // No one but GoogleURLTrackerMapEntry should call this. void DeleteMapEntryForManager( @@ -192,4 +193,4 @@ class GoogleURLTracker : public net::URLFetcherDelegate, DISALLOW_COPY_AND_ASSIGN(GoogleURLTracker); }; -#endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_H_ +#endif // COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_H_ diff --git a/components/google/core/browser/google_url_tracker_client.h b/components/google/core/browser/google_url_tracker_client.h index 044a89a..dc48686 100644 --- a/components/google/core/browser/google_url_tracker_client.h +++ b/components/google/core/browser/google_url_tracker_client.h @@ -6,6 +6,7 @@ #define COMPONENTS_GOOGLE_GOOGLE_URL_TRACKER_CLIENT_H_ #include "base/macros.h" +#include "url/gurl.h" class GoogleURLTracker; class PrefService; @@ -43,6 +44,18 @@ class GoogleURLTrackerClient { // should use. virtual net::URLRequestContextGetter* GetRequestContext() = 0; + // Returns whether |url| is for a Google domain. + // TODO(blundell): Eliminate this method in favor of having callers call + // google_util::IsGoogleDomainURL() directly once google_util is + // componentized. crbug.com/381088 + virtual bool IsGoogleDomainURL(const GURL& url) = 0; + + // Appends the Google locale as a param to |url|. + // TODO(blundell): Eliminate this method in favor of having callers call + // google_util::AppendGoogleLocaleParam() directly once google_util is + // componentized. crbug.com/381088 + virtual GURL AppendGoogleLocaleParam(const GURL& url) = 0; + protected: GoogleURLTracker* google_url_tracker() { return google_url_tracker_; } diff --git a/chrome/browser/google/google_url_tracker_infobar_delegate.cc b/components/google/core/browser/google_url_tracker_infobar_delegate.cc index 5fe1eee..9d15571 100644 --- a/chrome/browser/google/google_url_tracker_infobar_delegate.cc +++ b/components/google/core/browser/google_url_tracker_infobar_delegate.cc @@ -1,15 +1,14 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 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. -#include "chrome/browser/google/google_url_tracker_infobar_delegate.h" +#include "components/google/core/browser/google_url_tracker_infobar_delegate.h" -#include "chrome/browser/google/google_url_tracker.h" -#include "chrome/browser/google/google_url_tracker_navigation_helper.h" -#include "chrome/browser/google/google_util.h" +#include "components/google/core/browser/google_url_tracker.h" +#include "components/google/core/browser/google_url_tracker_navigation_helper.h" #include "components/infobars/core/infobar.h" #include "components/infobars/core/infobar_manager.h" -#include "grit/generated_resources.h" +#include "grit/components_strings.h" #include "net/base/net_util.h" #include "ui/base/l10n/l10n_util.h" @@ -100,13 +99,13 @@ base::string16 GoogleURLTrackerInfoBarDelegate::GetButtonLabel( } base::string16 GoogleURLTrackerInfoBarDelegate::GetLinkText() const { - return l10n_util::GetStringUTF16(IDS_LEARN_MORE); + return l10n_util::GetStringUTF16(IDS_GOOGLE_URL_TRACKER_INFOBAR_LEARN_MORE); } bool GoogleURLTrackerInfoBarDelegate::LinkClicked( WindowOpenDisposition disposition) { navigation_helper_->OpenURL( - google_util::AppendGoogleLocaleParam(GURL( + google_url_tracker_->client()->AppendGoogleLocaleParam(GURL( "https://www.google.com/support/chrome/bin/answer.py?" "answer=1618699")), (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, diff --git a/chrome/browser/google/google_url_tracker_infobar_delegate.h b/components/google/core/browser/google_url_tracker_infobar_delegate.h index 4905e1c..c422af1 100644 --- a/chrome/browser/google/google_url_tracker_infobar_delegate.h +++ b/components/google/core/browser/google_url_tracker_infobar_delegate.h @@ -1,9 +1,9 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 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. -#ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_INFOBAR_DELEGATE_H_ -#define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_INFOBAR_DELEGATE_H_ +#ifndef COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_INFOBAR_DELEGATE_H_ +#define COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_INFOBAR_DELEGATE_H_ #include "components/infobars/core/confirm_infobar_delegate.h" #include "url/gurl.h" @@ -80,4 +80,4 @@ class GoogleURLTrackerInfoBarDelegate : public ConfirmInfoBarDelegate { DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerInfoBarDelegate); }; -#endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_INFOBAR_DELEGATE_H_ +#endif // COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_INFOBAR_DELEGATE_H_ diff --git a/chrome/browser/google/google_url_tracker_map_entry.cc b/components/google/core/browser/google_url_tracker_map_entry.cc index f994f29..ef72281 100644 --- a/chrome/browser/google/google_url_tracker_map_entry.cc +++ b/components/google/core/browser/google_url_tracker_map_entry.cc @@ -1,11 +1,10 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 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. -#include "chrome/browser/google/google_url_tracker_map_entry.h" +#include "components/google/core/browser/google_url_tracker_map_entry.h" -#include "chrome/browser/chrome_notification_types.h" -#include "chrome/browser/google/google_url_tracker.h" +#include "components/google/core/browser/google_url_tracker.h" #include "components/infobars/core/infobar.h" GoogleURLTrackerMapEntry::GoogleURLTrackerMapEntry( diff --git a/chrome/browser/google/google_url_tracker_map_entry.h b/components/google/core/browser/google_url_tracker_map_entry.h index 5cdb2b5..4722f01 100644 --- a/chrome/browser/google/google_url_tracker_map_entry.h +++ b/components/google/core/browser/google_url_tracker_map_entry.h @@ -1,13 +1,13 @@ -// Copyright 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 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. -#ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_ -#define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_ +#ifndef COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_MAP_ENTRY_H_ +#define COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_MAP_ENTRY_H_ #include "base/memory/scoped_ptr.h" -#include "chrome/browser/google/google_url_tracker_infobar_delegate.h" -#include "chrome/browser/google/google_url_tracker_navigation_helper.h" +#include "components/google/core/browser/google_url_tracker_infobar_delegate.h" +#include "components/google/core/browser/google_url_tracker_navigation_helper.h" #include "components/infobars/core/infobar_manager.h" class GoogleURLTracker; @@ -61,4 +61,4 @@ class GoogleURLTrackerMapEntry : public infobars::InfoBarManager::Observer { DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerMapEntry); }; -#endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_MAP_ENTRY_H_ +#endif // COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_MAP_ENTRY_H_ diff --git a/chrome/browser/google/google_url_tracker_navigation_helper.cc b/components/google/core/browser/google_url_tracker_navigation_helper.cc index 84a2651..c420da6 100644 --- a/chrome/browser/google/google_url_tracker_navigation_helper.cc +++ b/components/google/core/browser/google_url_tracker_navigation_helper.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/google/google_url_tracker_navigation_helper.h" +#include "components/google/core/browser/google_url_tracker_navigation_helper.h" GoogleURLTrackerNavigationHelper::GoogleURLTrackerNavigationHelper( GoogleURLTracker* google_url_tracker) diff --git a/chrome/browser/google/google_url_tracker_navigation_helper.h b/components/google/core/browser/google_url_tracker_navigation_helper.h index 98b8b3a..2f64320 100644 --- a/chrome/browser/google/google_url_tracker_navigation_helper.h +++ b/components/google/core/browser/google_url_tracker_navigation_helper.h @@ -1,9 +1,9 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2014 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. -#ifndef CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_H_ -#define CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_H_ +#ifndef COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_H_ +#define COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_H_ #include "base/macros.h" #include "ui/base/window_open_disposition.h" @@ -51,4 +51,4 @@ class GoogleURLTrackerNavigationHelper { DISALLOW_COPY_AND_ASSIGN(GoogleURLTrackerNavigationHelper); }; -#endif // CHROME_BROWSER_GOOGLE_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_H_ +#endif // COMPONENTS_GOOGLE_CORE_BROWSER_GOOGLE_URL_TRACKER_NAVIGATION_HELPER_H_ diff --git a/components/google_strings.grdp b/components/google_strings.grdp new file mode 100644 index 0000000..b5a4a6a --- /dev/null +++ b/components/google_strings.grdp @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<grit-part> + + <message name="IDS_GOOGLE_URL_TRACKER_INFOBAR_MESSAGE" desc="Message displayed when the user's current Google TLD doesn't match the default for their location. This can be shortened in other languages (e.g. by removing 'would you like to') as needed to keep the translated strings from being much longer than English, so the infobar can still display all three IDS_GOOGLE_URL_TRACKER_ strings and a 'Learn more' link."> + Would you like to search with <ph name="NEW_GOOGLE_HOST">$1<ex>google.de</ex></ph> instead of <ph name="CURRENT_GOOGLE_HOST">$2<ex>google.fr</ex></ph>? + </message> + <message name="IDS_GOOGLE_URL_TRACKER_INFOBAR_SWITCH" desc="Button text for button that changes user's default Google TLD to a new TLD."> + Switch to <ph name="NEW_GOOGLE_HOST">$1<ex>google.de</ex></ph> + </message> + <message name="IDS_GOOGLE_URL_TRACKER_INFOBAR_DONT_SWITCH" desc="Button text for button that leaves user's default Google TLD unchanged."> + Keep using <ph name="CURRENT_GOOGLE_HOST">$1<ex>google.fr</ex></ph> + </message> + <message name="IDS_GOOGLE_URL_TRACKER_INFOBAR_LEARN_MORE" desc="Learn more text for the Google URL tracker infobar"> + Learn more + </message> + +</grit-part> |