| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_factory_test_util.h
" | 5 #include "chrome/browser/search_engines/template_url_service_factory_test_util.h
" |
| 6 | 6 |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "chrome/browser/search_engines/template_url_service_factory.h" | 8 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 9 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
| 10 #include "components/search_engines/default_search_pref_test_util.h" | 10 #include "components/search_engines/default_search_pref_test_util.h" |
| 11 #include "components/search_engines/template_url_service.h" | 11 #include "components/search_engines/template_url_service.h" |
| 12 #include "components/syncable_prefs/testing_pref_service_syncable.h" | 12 #include "components/sync_preferences/testing_pref_service_syncable.h" |
| 13 | 13 |
| 14 TemplateURLServiceFactoryTestUtil::TemplateURLServiceFactoryTestUtil( | 14 TemplateURLServiceFactoryTestUtil::TemplateURLServiceFactoryTestUtil( |
| 15 TestingProfile* profile) | 15 TestingProfile* profile) |
| 16 : profile_(profile) { | 16 : profile_(profile) { |
| 17 profile_->CreateWebDataService(); | 17 profile_->CreateWebDataService(); |
| 18 | 18 |
| 19 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse( | 19 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse( |
| 20 profile_, TemplateURLServiceFactory::BuildInstanceFor); | 20 profile_, TemplateURLServiceFactory::BuildInstanceFor); |
| 21 } | 21 } |
| 22 | 22 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 48 | 48 |
| 49 void | 49 void |
| 50 TemplateURLServiceFactoryTestUtil::RemoveManagedDefaultSearchPreferences() { | 50 TemplateURLServiceFactoryTestUtil::RemoveManagedDefaultSearchPreferences() { |
| 51 DefaultSearchPrefTestUtil::RemoveManagedPref( | 51 DefaultSearchPrefTestUtil::RemoveManagedPref( |
| 52 profile_->GetTestingPrefService()); | 52 profile_->GetTestingPrefService()); |
| 53 } | 53 } |
| 54 | 54 |
| 55 TemplateURLService* TemplateURLServiceFactoryTestUtil::model() const { | 55 TemplateURLService* TemplateURLServiceFactoryTestUtil::model() const { |
| 56 return TemplateURLServiceFactory::GetForProfile(profile_); | 56 return TemplateURLServiceFactory::GetForProfile(profile_); |
| 57 } | 57 } |
| OLD | NEW |