OLD | NEW |
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 "chrome/browser/search_engines/template_url_service_test_util.h" | 5 #include "chrome/browser/search_engines/template_url_service_test_util.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/scoped_temp_dir.h" | 10 #include "base/scoped_temp_dir.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 219 |
220 void TemplateURLServiceTestUtil::SetGoogleBaseURL( | 220 void TemplateURLServiceTestUtil::SetGoogleBaseURL( |
221 const std::string& base_url) const { | 221 const std::string& base_url) const { |
222 UIThreadSearchTermsData::SetGoogleBaseURL(new std::string(base_url)); | 222 UIThreadSearchTermsData::SetGoogleBaseURL(new std::string(base_url)); |
223 content::NotificationService::current()->Notify( | 223 content::NotificationService::current()->Notify( |
224 chrome::NOTIFICATION_GOOGLE_URL_UPDATED, | 224 chrome::NOTIFICATION_GOOGLE_URL_UPDATED, |
225 content::NotificationService::AllSources(), | 225 content::NotificationService::AllSources(), |
226 content::NotificationService::NoDetails()); | 226 content::NotificationService::NoDetails()); |
227 } | 227 } |
228 | 228 |
229 WebDataService* TemplateURLServiceTestUtil::GetWebDataService() { | |
230 return profile_->GetWebDataService(Profile::EXPLICIT_ACCESS); | |
231 } | |
232 | |
233 TemplateURLService* TemplateURLServiceTestUtil::model() const { | 229 TemplateURLService* TemplateURLServiceTestUtil::model() const { |
234 return TemplateURLServiceFactory::GetForProfile(profile()); | 230 return TemplateURLServiceFactory::GetForProfile(profile()); |
235 } | 231 } |
236 | 232 |
237 TestingProfile* TemplateURLServiceTestUtil::profile() const { | 233 TestingProfile* TemplateURLServiceTestUtil::profile() const { |
238 return profile_.get(); | 234 return profile_.get(); |
239 } | 235 } |
240 | 236 |
241 void TemplateURLServiceTestUtil::StartIOThread() { | 237 void TemplateURLServiceTestUtil::StartIOThread() { |
242 profile_->StartIOThread(); | 238 profile_->StartIOThread(); |
243 } | 239 } |
OLD | NEW |