From 623de74f174b29368b6e0c87527c84955212dddd Mon Sep 17 00:00:00 2001 From: "pkasting@chromium.org" Date: Wed, 14 Mar 2012 21:36:02 +0000 Subject: Clean up TemplateURL prepopulate data: * Replace a pair of overlapping functions in the API with two distinct accessors for relevant pieces of information about prepopulated URLs. One key side effect here is that we no longer return TemplateURL*s from these, which will make the upcoming refactoring changes slightly cleaner. * Make the implementation of these a bit more robust w.r.t. determining if a provided URL corresponds to Google. This will also be important later as we'll want to be able to match a hand-coded "google.co.uk" entry against an auto-generated "google.de" entry (or similar). * Remove a bunch of string conversions, as well as a lot of passing of raw C-style string pointers. * Remove using statements. * Remove two obscure engines which have the same hostname as another, different engine. These cause problems when we ask for the name or type of an engine because the answer we get back is basically indeterminate. I don't think either of these is very important (they lived at slots 4 and 5 in their respective countries) so just gut them. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9705021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126746 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/google/google_util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'chrome/browser/google/google_util.h') diff --git a/chrome/browser/google/google_util.h b/chrome/browser/google/google_util.h index cb7167b..e4d53b9 100644 --- a/chrome/browser/google/google_util.h +++ b/chrome/browser/google/google_util.h @@ -38,6 +38,9 @@ bool GetBrand(std::string* brand); // install. Returns false if the information is not available. bool GetReactivationBrand(std::string* brand); +// True if |host| is "[www.]google." with a valid TLD. +bool IsGoogleHostname(const std::string& host); + // True if |url| represents a valid Google home page URL. bool IsGoogleHomePageUrl(const std::string& url); -- cgit v1.1