Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2514)

Unified Diff: chrome/browser/search_engines/template_url.cc

Issue 268643002: Use the DefaultSearchManager as the exclusive authority on DSE, ignoring Web Data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the KeywordEditorControllerTest. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 501b7989e44816bed5d46828a94a22b1aefe07e6..a65b43b9458c070f9715042fbad861b2d3d404b8 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_;
Peter Kasting 2014/05/03 00:28:18 Not copying this seems highly error-prone. The pr
- data_ = other.data_;
+ data_ = other;
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) {

Powered by Google App Engine
This is Rietveld 408576698