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

Unified Diff: chrome/browser/autocomplete/search_provider_unittest.cc

Issue 9982018: Move most TemplateURL data members to a new struct, TemplateURLData. This allows us to eliminate t… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « chrome/browser/autocomplete/search_provider.h ('k') | chrome/browser/importer/firefox2_importer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/search_provider_unittest.cc
===================================================================
--- chrome/browser/autocomplete/search_provider_unittest.cc (revision 130759)
+++ chrome/browser/autocomplete/search_provider_unittest.cc (working copy)
@@ -121,10 +121,11 @@
turl_model->Load();
// Reset the default TemplateURL.
- default_t_url_ = new TemplateURL();
- default_t_url_->SetURL("http://defaultturl/{searchTerms}");
- default_t_url_->SetSuggestionsURL("http://defaultturl2/{searchTerms}");
- default_t_url_->set_short_name(ASCIIToUTF16("t"));
+ TemplateURLData data;
+ data.short_name = ASCIIToUTF16("t");
+ data.SetURL("http://defaultturl/{searchTerms}");
+ data.suggestions_url = "http://defaultturl2/{searchTerms}";
+ default_t_url_ = new TemplateURL(data);
turl_model->Add(default_t_url_);
turl_model->SetDefaultSearchProvider(default_t_url_);
TemplateURLID default_provider_id = default_t_url_->id();
@@ -134,11 +135,11 @@
term1_url_ = AddSearchToHistory(default_t_url_, term1_, 1);
// Create another TemplateURL.
- keyword_t_url_ = new TemplateURL();
- keyword_t_url_->set_keyword(ASCIIToUTF16("k"));
- keyword_t_url_->set_short_name(ASCIIToUTF16("k"));
- keyword_t_url_->SetURL("http://keyword/{searchTerms}");
- keyword_t_url_->SetSuggestionsURL("http://suggest_keyword/{searchTerms}");
+ data.short_name = ASCIIToUTF16("k");
+ data.SetKeyword(ASCIIToUTF16("k"));
+ data.SetURL("http://keyword/{searchTerms}");
+ data.suggestions_url = "http://suggest_keyword/{searchTerms}";
+ keyword_t_url_ = new TemplateURL(data);
turl_model->Add(keyword_t_url_);
ASSERT_NE(0, keyword_t_url_->id());
« no previous file with comments | « chrome/browser/autocomplete/search_provider.h ('k') | chrome/browser/importer/firefox2_importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698