Chromium Code Reviews| Index: chrome/browser/search_engines/template_url.cc |
| diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc |
| index 874b4bbaa33bed834f6211b2bcf0b8aac9fc5ff7..e26c429a8f8b17647ad6e1bc9ec8a2c78c8288c4 100644 |
| --- a/chrome/browser/search_engines/template_url.cc |
| +++ b/chrome/browser/search_engines/template_url.cc |
| @@ -1276,16 +1276,15 @@ void TemplateURL::EncodeSearchTerms( |
| NOTREACHED(); |
| } |
| -void TemplateURL::CopyFrom(const TemplateURL& other) { |
| - if (this == &other) |
| +void TemplateURL::CopyFrom(const TemplateURLData& other) { |
| + if (&data_ == &other) |
| return; |
| - profile_ = other.profile_; |
| - data_ = other.data_; |
| + data_ = other; |
|
Peter Kasting
2014/05/07 23:38:29
Eliminating the profile copy here still seems wron
|
| url_ref_.InvalidateCachedValues(); |
| suggestions_url_ref_.InvalidateCachedValues(); |
| instant_url_ref_.InvalidateCachedValues(); |
| - SetPrepopulateId(other.data_.prepopulate_id); |
| + SetPrepopulateId(other.prepopulate_id); |
| } |
| void TemplateURL::SetURL(const std::string& url) { |