summaryrefslogtreecommitdiffstats
path: root/chrome/browser/search_engines/template_url.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 01:44:10 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 01:44:10 +0000
commite82730935edb15650a5a59986eb539fd1bc30fb5 (patch)
tree4e9edea2d72005be0963a6dabc9597773903f587 /chrome/browser/search_engines/template_url.h
parente55827e5975b735dbd0e8e27691b2300205afb84 (diff)
downloadchromium_src-e82730935edb15650a5a59986eb539fd1bc30fb5.zip
chromium_src-e82730935edb15650a5a59986eb539fd1bc30fb5.tar.gz
chromium_src-e82730935edb15650a5a59986eb539fd1bc30fb5.tar.bz2
Clean up TemplateURLParser:
* Change signature to return an allocated TemplateURL* instead of requiring callers to create one and then returning a bool. This will make it easier to modify how TemplateURLs are created later, and also simplifies callers a bit. * Remove TemplateURL::add_language() as all callers are already friends and can do this directly. * Generate a keyword for the TemplateURL inside the parser itself. This will become mandatory later when keywords become non-optional. * Take a Profile* in the parser constructor. This is currently unused, I'll use it later and was lazy enough to not want to add the diffs of plumbing it later :) * Make Parse() take char* instead of unsigned char* to avoid silly reinterpret_casts on both sides of the call. * Now that most of the parsing code is in TemplateURLParsingContext member functions, eliminate a lot of now-unnecessary accessor functions and helpers by inlining them, and take advantage of "friend of TemplateURL" status. * Style fixes, e.g. "type *name" -> "type* name". * Shorten. * Deinline functions in unittest helper class or rename them in unix_hacker() style. * Add some ASSERT_NO_FATAL_FAILURE()s. * Special-case an edge (that I am not sure can happen) in TemplateURLService::GenerateKeyword() in order to guarantee that callers with a valid URL and |autodetected| set to false will always get a non-empty keyword. (Later this function will be condensed more so that it guarantees non-empty keywords in all cases, by expecting callers to handle the exceptions before calling it.) BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9728010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127613 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines/template_url.h')
-rw-r--r--chrome/browser/search_engines/template_url.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/chrome/browser/search_engines/template_url.h b/chrome/browser/search_engines/template_url.h
index 667b8f5..da3c2b1 100644
--- a/chrome/browser/search_engines/template_url.h
+++ b/chrome/browser/search_engines/template_url.h
@@ -434,9 +434,6 @@ class TemplateURL {
GURL GetFaviconURL() const;
// Set of languages supported. This may be empty.
- void add_language(const string16& language) {
- languages_.push_back(language);
- }
std::vector<string16> languages() const { return languages_; }
// Date this keyword was created.