summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-17 19:44:37 +0000
committerevanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-17 19:44:37 +0000
commita16d22388edff186095e37fecd5537beae88c7c9 (patch)
treee3253799ee66c81a434348a625be9b3d471ad8e1 /chrome/browser
parenta0729671be0628b5d2c45ef9c19a51c53bfa65b5 (diff)
downloadchromium_src-a16d22388edff186095e37fecd5537beae88c7c9.zip
chromium_src-a16d22388edff186095e37fecd5537beae88c7c9.tar.gz
chromium_src-a16d22388edff186095e37fecd5537beae88c7c9.tar.bz2
Fix Linux release build.
Review URL: http://codereview.chromium.org/15401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/template_url_model.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/chrome/browser/template_url_model.cc b/chrome/browser/template_url_model.cc
index aebc1dd..a3ffd5f 100644
--- a/chrome/browser/template_url_model.cc
+++ b/chrome/browser/template_url_model.cc
@@ -604,11 +604,12 @@ void TemplateURLModel::OnWebDataServiceRequestDone(
// loading. Now that we've loaded we can nuke it.
prefs_default_search_provider_.reset();
- // Compiler won't convert std::vector<TemplateURL*> to
- // std::vector<const TemplateURL*>.
- std::vector<const TemplateURL*> template_urls =
- *reinterpret_cast<std::vector<const TemplateURL*>* >(
- &keyword_result.keywords);
+ // Compiler won't implicitly convert std::vector<TemplateURL*> to
+ // std::vector<const TemplateURL*>, and reinterpret_cast is unsafe,
+ // so we just copy it.
+ std::vector<const TemplateURL*> template_urls(keyword_result.keywords.begin(),
+ keyword_result.keywords.end());
+
const int resource_keyword_version =
TemplateURLPrepopulateData::GetDataVersion();
if (keyword_result.builtin_keyword_version != resource_keyword_version) {