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

Side by Side Diff: chrome/browser/search_engines/search_provider_install_data_unittest.cc

Issue 338363004: Remove Profile* from TemplateURL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 testing::Test::TearDown(); 171 testing::Test::TearDown();
172 } 172 }
173 173
174 TemplateURL* SearchProviderInstallDataTest::AddNewTemplateURL( 174 TemplateURL* SearchProviderInstallDataTest::AddNewTemplateURL(
175 const std::string& url, 175 const std::string& url,
176 const base::string16& keyword) { 176 const base::string16& keyword) {
177 TemplateURLData data; 177 TemplateURLData data;
178 data.short_name = keyword; 178 data.short_name = keyword;
179 data.SetKeyword(keyword); 179 data.SetKeyword(keyword);
180 data.SetURL(url); 180 data.SetURL(url);
181 TemplateURL* t_url = new TemplateURL(util_.profile(), data); 181 TemplateURL* t_url = new TemplateURL(data);
182 util_.model()->Add(t_url); 182 util_.model()->Add(t_url);
183 return t_url; 183 return t_url;
184 } 184 }
185 185
186 void SearchProviderInstallDataTest::SetGoogleBaseURLAndProcessOnIOThread( 186 void SearchProviderInstallDataTest::SetGoogleBaseURLAndProcessOnIOThread(
187 GURL base_url) { 187 GURL base_url) {
188 util_.SetGoogleBaseURL(base_url); 188 util_.SetGoogleBaseURL(base_url);
189 BrowserThread::PostTask( 189 BrowserThread::PostTask(
190 BrowserThread::IO, 190 BrowserThread::IO,
191 FROM_HERE, 191 FROM_HERE,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 // Verify the search providers install state (with no default set). 271 // Verify the search providers install state (with no default set).
272 test_get_install_state.RunTests(google_host, std::string()); 272 test_get_install_state.RunTests(google_host, std::string());
273 273
274 // Change the Google base url. 274 // Change the Google base url.
275 google_host = "foo.com"; 275 google_host = "foo.com";
276 SetGoogleBaseURLAndProcessOnIOThread(GURL("http://" + google_host + "/")); 276 SetGoogleBaseURLAndProcessOnIOThread(GURL("http://" + google_host + "/"));
277 277
278 // Verify that the change got picked up. 278 // Verify that the change got picked up.
279 test_get_install_state.RunTests(google_host, std::string()); 279 test_get_install_state.RunTests(google_host, std::string());
280 } 280 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/search_provider_install_data.cc ('k') | chrome/browser/search_engines/template_url.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698