| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 19 matching lines...) Expand all Loading... |
| 30 #include "chrome/browser/net/pref_proxy_config_service.h" | 30 #include "chrome/browser/net/pref_proxy_config_service.h" |
| 31 #include "chrome/browser/notifications/desktop_notification_service.h" | 31 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 32 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 32 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 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/search_engines/template_url_fetcher.h" | 37 #include "chrome/browser/search_engines/template_url_fetcher.h" |
| 38 #include "chrome/browser/search_engines/template_url_service.h" | 38 #include "chrome/browser/search_engines/template_url_service.h" |
| 39 #include "chrome/browser/search_engines/template_url_service_factory.h" | 39 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 40 #include "chrome/browser/speech/chrome_speech_input_preferences.h" |
| 40 #include "chrome/browser/sync/profile_sync_service_mock.h" | 41 #include "chrome/browser/sync/profile_sync_service_mock.h" |
| 41 #include "chrome/browser/ui/find_bar/find_bar_state.h" | 42 #include "chrome/browser/ui/find_bar/find_bar_state.h" |
| 42 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 43 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 43 #include "chrome/common/chrome_constants.h" | 44 #include "chrome/common/chrome_constants.h" |
| 44 #include "chrome/common/chrome_notification_types.h" | 45 #include "chrome/common/chrome_notification_types.h" |
| 45 #include "chrome/common/url_constants.h" | 46 #include "chrome/common/url_constants.h" |
| 46 #include "chrome/test/base/bookmark_load_observer.h" | 47 #include "chrome/test/base/bookmark_load_observer.h" |
| 47 #include "chrome/test/base/test_url_request_context_getter.h" | 48 #include "chrome/test/base/test_url_request_context_getter.h" |
| 48 #include "chrome/test/base/testing_pref_service.h" | 49 #include "chrome/test/base/testing_pref_service.h" |
| 49 #include "chrome/test/base/ui_test_utils.h" | 50 #include "chrome/test/base/ui_test_utils.h" |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 | 630 |
| 630 GeolocationPermissionContext* | 631 GeolocationPermissionContext* |
| 631 TestingProfile::GetGeolocationPermissionContext() { | 632 TestingProfile::GetGeolocationPermissionContext() { |
| 632 if (!geolocation_permission_context_.get()) { | 633 if (!geolocation_permission_context_.get()) { |
| 633 geolocation_permission_context_ = | 634 geolocation_permission_context_ = |
| 634 new ChromeGeolocationPermissionContext(this); | 635 new ChromeGeolocationPermissionContext(this); |
| 635 } | 636 } |
| 636 return geolocation_permission_context_.get(); | 637 return geolocation_permission_context_.get(); |
| 637 } | 638 } |
| 638 | 639 |
| 640 SpeechInputPreferences* TestingProfile::GetSpeechInputPreferences() { |
| 641 if (!speech_input_preferences_.get()) |
| 642 speech_input_preferences_ = new ChromeSpeechInputPreferences(GetPrefs()); |
| 643 return speech_input_preferences_.get(); |
| 644 } |
| 645 |
| 639 HostZoomMap* TestingProfile::GetHostZoomMap() { | 646 HostZoomMap* TestingProfile::GetHostZoomMap() { |
| 640 return NULL; | 647 return NULL; |
| 641 } | 648 } |
| 642 | 649 |
| 643 bool TestingProfile::HasProfileSyncService() const { | 650 bool TestingProfile::HasProfileSyncService() const { |
| 644 return (profile_sync_service_.get() != NULL); | 651 return (profile_sync_service_.get() != NULL); |
| 645 } | 652 } |
| 646 | 653 |
| 647 std::wstring TestingProfile::GetName() { | 654 std::wstring TestingProfile::GetName() { |
| 648 return std::wstring(); | 655 return std::wstring(); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { | 800 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { |
| 794 return GetExtensionSpecialStoragePolicy(); | 801 return GetExtensionSpecialStoragePolicy(); |
| 795 } | 802 } |
| 796 | 803 |
| 797 void TestingProfile::DestroyWebDataService() { | 804 void TestingProfile::DestroyWebDataService() { |
| 798 if (!web_data_service_.get()) | 805 if (!web_data_service_.get()) |
| 799 return; | 806 return; |
| 800 | 807 |
| 801 web_data_service_->Shutdown(); | 808 web_data_service_->Shutdown(); |
| 802 } | 809 } |
| OLD | NEW |