summaryrefslogtreecommitdiffstats
path: root/chrome/browser/importer/profile_writer.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-23 18:40:26 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-23 18:40:26 +0000
commit16fca9b8a9e129a2bc50bc39fa3d2b33db64efdb (patch)
tree09d56d4b75a0651a3ad4f82a4111c2943af772a1 /chrome/browser/importer/profile_writer.cc
parent5284ee3d4b255ba50147550b5de9df85fc71076d (diff)
downloadchromium_src-16fca9b8a9e129a2bc50bc39fa3d2b33db64efdb.zip
chromium_src-16fca9b8a9e129a2bc50bc39fa3d2b33db64efdb.tar.gz
chromium_src-16fca9b8a9e129a2bc50bc39fa3d2b33db64efdb.tar.bz2
Add a Profile* member to TemplateURL. This makes some invocations of ReplaceSearchTerms() a bit less verbose, and will be useful later when UIThreadSearchTermsData starts taking a Profile*.
One downside is that there are a number of const_cast<>()s added when we try to access the profile() of a const TemplateURL*. These will all go away soon when TemplateURLService is switched to using "const" much less, so I didn't worry too much about them. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10173001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer/profile_writer.cc')
-rw-r--r--chrome/browser/importer/profile_writer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc
index ee478a0..2450e58 100644
--- a/chrome/browser/importer/profile_writer.cc
+++ b/chrome/browser/importer/profile_writer.cc
@@ -316,8 +316,8 @@ void ProfileWriter::AddKeywords(ScopedVector<TemplateURL> template_urls,
// Only add valid TemplateURLs to the model.
if ((*i)->url_ref().IsValid()) {
- model->Add(*i); // Takes ownership.
- *i = NULL; // Prevent the vector from deleting *i later.
+ model->AddAndSetProfile(*i, profile_); // Takes ownership.
+ *i = NULL; // Prevent the vector from deleting *i later.
}
}
}