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

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 10196004: Changed ChromeURLDataManager to a ProfileKeyedService and made a Factory for it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Made ChromeURLDataManager's destructor virtual Created 8 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 unified diff | Download patch
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/test/base/testing_profile.h" 5 #include "chrome/test/base/testing_profile.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 22 matching lines...) Expand all
33 #include "chrome/browser/prefs/browser_prefs.h" 33 #include "chrome/browser/prefs/browser_prefs.h"
34 #include "chrome/browser/prefs/testing_pref_store.h" 34 #include "chrome/browser/prefs/testing_pref_store.h"
35 #include "chrome/browser/prerender/prerender_manager.h" 35 #include "chrome/browser/prerender/prerender_manager.h"
36 #include "chrome/browser/profiles/profile_dependency_manager.h" 36 #include "chrome/browser/profiles/profile_dependency_manager.h"
37 #include "chrome/browser/protector/protector_service_factory.h" 37 #include "chrome/browser/protector/protector_service_factory.h"
38 #include "chrome/browser/search_engines/template_url_fetcher_factory.h" 38 #include "chrome/browser/search_engines/template_url_fetcher_factory.h"
39 #include "chrome/browser/search_engines/template_url_service.h" 39 #include "chrome/browser/search_engines/template_url_service.h"
40 #include "chrome/browser/search_engines/template_url_service_factory.h" 40 #include "chrome/browser/search_engines/template_url_service_factory.h"
41 #include "chrome/browser/speech/chrome_speech_recognition_preferences.h" 41 #include "chrome/browser/speech/chrome_speech_recognition_preferences.h"
42 #include "chrome/browser/sync/profile_sync_service_mock.h" 42 #include "chrome/browser/sync/profile_sync_service_mock.h"
43 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
44 #include "chrome/common/chrome_constants.h" 43 #include "chrome/common/chrome_constants.h"
45 #include "chrome/common/chrome_notification_types.h" 44 #include "chrome/common/chrome_notification_types.h"
46 #include "chrome/common/chrome_switches.h" 45 #include "chrome/common/chrome_switches.h"
47 #include "chrome/common/url_constants.h" 46 #include "chrome/common/url_constants.h"
48 #include "chrome/test/base/bookmark_load_observer.h" 47 #include "chrome/test/base/bookmark_load_observer.h"
49 #include "chrome/test/base/testing_pref_service.h" 48 #include "chrome/test/base/testing_pref_service.h"
50 #include "chrome/test/base/ui_test_utils.h" 49 #include "chrome/test/base/ui_test_utils.h"
51 #include "content/public/browser/browser_thread.h" 50 #include "content/public/browser/browser_thread.h"
52 #include "content/public/browser/notification_service.h" 51 #include "content/public/browser/notification_service.h"
53 #include "content/test/mock_resource_context.h" 52 #include "content/test/mock_resource_context.h"
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 672
674 void TestingProfile::BlockUntilHistoryProcessesPendingRequests() { 673 void TestingProfile::BlockUntilHistoryProcessesPendingRequests() {
675 DCHECK(history_service_.get()); 674 DCHECK(history_service_.get());
676 DCHECK(MessageLoop::current()); 675 DCHECK(MessageLoop::current());
677 676
678 CancelableRequestConsumer consumer; 677 CancelableRequestConsumer consumer;
679 history_service_->ScheduleDBTask(new QuittingHistoryDBTask(), &consumer); 678 history_service_->ScheduleDBTask(new QuittingHistoryDBTask(), &consumer);
680 MessageLoop::current()->Run(); 679 MessageLoop::current()->Run();
681 } 680 }
682 681
683 ChromeURLDataManager* TestingProfile::GetChromeURLDataManager() {
684 if (!chrome_url_data_manager_.get())
685 chrome_url_data_manager_.reset(
686 new ChromeURLDataManager(
687 base::Callback<ChromeURLDataManagerBackend*(void)>()));
688 return chrome_url_data_manager_.get();
689 }
690
691 chrome_browser_net::Predictor* TestingProfile::GetNetworkPredictor() { 682 chrome_browser_net::Predictor* TestingProfile::GetNetworkPredictor() {
692 return NULL; 683 return NULL;
693 } 684 }
694 685
695 void TestingProfile::ClearNetworkingHistorySince(base::Time time) { 686 void TestingProfile::ClearNetworkingHistorySince(base::Time time) {
696 NOTIMPLEMENTED(); 687 NOTIMPLEMENTED();
697 } 688 }
698 689
699 GURL TestingProfile::GetHomePage() { 690 GURL TestingProfile::GetHomePage() {
700 return GURL(chrome::kChromeUINewTabURL); 691 return GURL(chrome::kChromeUINewTabURL);
(...skipping 10 matching lines...) Expand all
711 void TestingProfile::DestroyWebDataService() { 702 void TestingProfile::DestroyWebDataService() {
712 if (!web_data_service_.get()) 703 if (!web_data_service_.get())
713 return; 704 return;
714 705
715 web_data_service_->Shutdown(); 706 web_data_service_->Shutdown();
716 } 707 }
717 708
718 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { 709 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) {
719 return true; 710 return true;
720 } 711 }
712
713 base::Callback<ChromeURLDataManagerBackend*(void)>
714 TestingProfile::GetChromeURLDataManagerBackendGetter() const {
715 return base::Callback<ChromeURLDataManagerBackend*(void)>();
716 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698