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

Unified Diff: chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc

Issue 280113002: Revert of Use the DefaultSearchManager as the exclusive authority on DSE, ignoring Web Data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/profile_resetter/automatic_profile_resetter_delegate.cc
diff --git a/chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc b/chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc
index 3e51eec66e22d833ac44b1995335354e0921adab..b2515fcda7dfd8808fd0b114779dcf2dfbb89fba 100644
--- a/chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc
+++ b/chrome/browser/profile_resetter/automatic_profile_resetter_delegate.cc
@@ -41,52 +41,40 @@
scoped_ptr<base::DictionaryValue> BuildSubTreeFromTemplateURL(
const TemplateURL* template_url) {
+ scoped_ptr<base::DictionaryValue> tree(new base::DictionaryValue);
+ tree->SetString("search_url", template_url->url());
// If this value contains a placeholder in the pre-populated data, it will
// have been replaced as it was loaded into a TemplateURL.
// BuildSubTreeFromTemplateURL works with TemplateURL (not TemplateURLData)
// in order to maintain this behaviour.
// TODO(engedy): Confirm the expected behaviour and convert to use
// TemplateURLData if possible."
- scoped_ptr<base::DictionaryValue> tree(new base::DictionaryValue);
- tree->SetString("name", template_url->short_name());
- tree->SetString("short_name", template_url->short_name());
- tree->SetString("keyword", template_url->keyword());
- tree->SetString("search_url", template_url->url());
- tree->SetString("url", template_url->url());
- tree->SetString("suggestions_url", template_url->suggestions_url());
+ tree->SetString("search_terms_replacement_key",
+ template_url->search_terms_replacement_key());
+ tree->SetString("suggest_url", template_url->suggestions_url());
tree->SetString("instant_url", template_url->instant_url());
tree->SetString("image_url", template_url->image_url());
tree->SetString("new_tab_url", template_url->new_tab_url());
tree->SetString("search_url_post_params",
template_url->search_url_post_params());
- tree->SetString("suggestions_url_post_params",
+ tree->SetString("suggest_url_post_params",
template_url->suggestions_url_post_params());
tree->SetString("instant_url_post_params",
template_url->instant_url_post_params());
tree->SetString("image_url_post_params",
template_url->image_url_post_params());
+ tree->SetString("icon_url", template_url->favicon_url().spec());
+ tree->SetString("name", template_url->short_name());
+ tree->SetString("keyword", template_url->keyword());
+ base::ListValue* input_encodings = new base::ListValue;
+ input_encodings->AppendStrings(template_url->input_encodings());
+ tree->Set("encodings", input_encodings);
+ tree->SetString("id", base::Int64ToString(template_url->id()));
+ tree->SetString("prepopulate_id",
+ base::IntToString(template_url->prepopulate_id()));
base::ListValue* alternate_urls = new base::ListValue;
alternate_urls->AppendStrings(template_url->alternate_urls());
tree->Set("alternate_urls", alternate_urls);
- tree->SetString("favicon_url", template_url->favicon_url().spec());
- tree->SetString("originating_url", template_url->originating_url().spec());
- tree->SetBoolean("safe_for_autoreplace",
- template_url->safe_for_autoreplace());
- base::ListValue* input_encodings = new base::ListValue;
- input_encodings->AppendStrings(template_url->input_encodings());
- tree->Set("input_encodings", input_encodings);
- tree->SetString("id", base::Int64ToString(template_url->id()));
- tree->SetString("date_created",
- base::Int64ToString(
- template_url->date_created().ToInternalValue()));
- tree->SetString("last_modified",
- base::Int64ToString(
- template_url->last_modified().ToInternalValue()));
- tree->SetBoolean("created_by_policy", template_url->created_by_policy());
- tree->SetInteger("usage_count", template_url->usage_count());
- tree->SetInteger("prepopulate_id", template_url->prepopulate_id());
- tree->SetString("search_terms_replacement_key",
- template_url->search_terms_replacement_key());
return tree.Pass();
}

Powered by Google App Engine
This is Rietveld 408576698