diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-03 19:28:32 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-03 19:28:32 +0000 |
commit | c551eab78ed90d864c0a289c229a87e25be5a6ce (patch) | |
tree | 8ae88c97308073fafc0da78f8cd176c82c19a544 /chrome/browser/importer/firefox_importer_utils.cc | |
parent | da965a2d2466edef79e9b6bd3f8c3668f6b7a52f (diff) | |
download | chromium_src-c551eab78ed90d864c0a289c229a87e25be5a6ce.zip chromium_src-c551eab78ed90d864c0a289c229a87e25be5a6ce.tar.gz chromium_src-c551eab78ed90d864c0a289c229a87e25be5a6ce.tar.bz2 |
Move the URL string from TemplateURLRef onto the owning TemplateURL. This will make it easier to move the data members of TemplateURL into a new class later.
This changes the accessors for TemplateURL's TemplateURLRefs. There are now separate accessors for the URLs as strings and as TemplateURLRefs, and the latter have changed to returning a const ref, meaning they no longer return NULL when the corresponding URL string is empty. This makes a number of callers clearer.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9968016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130431 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer/firefox_importer_utils.cc')
-rw-r--r-- | chrome/browser/importer/firefox_importer_utils.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/importer/firefox_importer_utils.cc b/chrome/browser/importer/firefox_importer_utils.cc index db7e48c..5904940 100644 --- a/chrome/browser/importer/firefox_importer_utils.cc +++ b/chrome/browser/importer/firefox_importer_utils.cc @@ -203,11 +203,11 @@ void ParseSearchEnginesFromXMLFiles(const std::vector<FilePath>& xml_files, TemplateURL* template_url = TemplateURLParser::Parse(NULL, content.data(), content.length(), ¶m_filter); if (template_url) { - std::string url = template_url->url()->url(); - SearchEnginesMap::iterator iter = search_engine_for_url.find(url); + SearchEnginesMap::iterator iter = + search_engine_for_url.find(template_url->url()); if (iter == search_engine_for_url.end()) { iter = search_engine_for_url.insert( - std::make_pair(url, template_url)).first; + std::make_pair(template_url->url(), template_url)).first; } else { // We have already found a search engine with the same URL. We give // priority to the latest one found, as GetSearchEnginesXMLFiles() |