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" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/message_loop_proxy.h" | 12 #include "base/message_loop_proxy.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/string_number_conversions.h" | 14 #include "base/string_number_conversions.h" |
15 #include "chrome/browser/autocomplete/autocomplete_classifier.h" | 15 #include "chrome/browser/autocomplete/autocomplete_classifier.h" |
16 #include "chrome/browser/bookmarks/bookmark_model.h" | 16 #include "chrome/browser/bookmarks/bookmark_model.h" |
17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
18 #include "chrome/browser/content_settings/host_content_settings_map.h" | 18 #include "chrome/browser/content_settings/host_content_settings_map.h" |
19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
20 #include "chrome/browser/extensions/extension_pref_value_map.h" | 20 #include "chrome/browser/extensions/extension_pref_value_map.h" |
21 #include "chrome/browser/extensions/extension_service.h" | 21 #include "chrome/browser/extensions/extension_service.h" |
22 #include "chrome/browser/extensions/extension_settings.h" | 22 #include "chrome/browser/extensions/extension_settings.h" |
23 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 23 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
24 #include "chrome/browser/favicon/favicon_service.h" | 24 #include "chrome/browser/favicon/favicon_service.h" |
25 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" | 25 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" |
26 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | |
27 #include "chrome/browser/history/history.h" | 26 #include "chrome/browser/history/history.h" |
28 #include "chrome/browser/history/history_backend.h" | 27 #include "chrome/browser/history/history_backend.h" |
29 #include "chrome/browser/history/top_sites.h" | 28 #include "chrome/browser/history/top_sites.h" |
30 #include "chrome/browser/net/gaia/token_service.h" | 29 #include "chrome/browser/net/gaia/token_service.h" |
31 #include "chrome/browser/net/pref_proxy_config_service.h" | 30 #include "chrome/browser/net/pref_proxy_config_service.h" |
32 #include "chrome/browser/notifications/desktop_notification_service.h" | 31 #include "chrome/browser/notifications/desktop_notification_service.h" |
33 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 32 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
34 #include "chrome/browser/prefs/browser_prefs.h" | 33 #include "chrome/browser/prefs/browser_prefs.h" |
35 #include "chrome/browser/prefs/testing_pref_store.h" | 34 #include "chrome/browser/prefs/testing_pref_store.h" |
36 #include "chrome/browser/prerender/prerender_manager.h" | 35 #include "chrome/browser/prerender/prerender_manager.h" |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 } | 624 } |
626 | 625 |
627 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { | 626 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { |
628 if (!host_content_settings_map_.get()) { | 627 if (!host_content_settings_map_.get()) { |
629 host_content_settings_map_ = new HostContentSettingsMap( | 628 host_content_settings_map_ = new HostContentSettingsMap( |
630 GetPrefs(), GetExtensionService(), false); | 629 GetPrefs(), GetExtensionService(), false); |
631 } | 630 } |
632 return host_content_settings_map_.get(); | 631 return host_content_settings_map_.get(); |
633 } | 632 } |
634 | 633 |
635 GeolocationContentSettingsMap* | |
636 TestingProfile::GetGeolocationContentSettingsMap() { | |
637 if (!geolocation_content_settings_map_.get()) { | |
638 geolocation_content_settings_map_ = | |
639 new GeolocationContentSettingsMap(this); | |
640 } | |
641 return geolocation_content_settings_map_.get(); | |
642 } | |
643 | |
644 GeolocationPermissionContext* | 634 GeolocationPermissionContext* |
645 TestingProfile::GetGeolocationPermissionContext() { | 635 TestingProfile::GetGeolocationPermissionContext() { |
646 if (!geolocation_permission_context_.get()) { | 636 if (!geolocation_permission_context_.get()) { |
647 geolocation_permission_context_ = | 637 geolocation_permission_context_ = |
648 new ChromeGeolocationPermissionContext(this); | 638 new ChromeGeolocationPermissionContext(this); |
649 } | 639 } |
650 return geolocation_permission_context_.get(); | 640 return geolocation_permission_context_.get(); |
651 } | 641 } |
652 | 642 |
653 HostZoomMap* TestingProfile::GetHostZoomMap() { | 643 HostZoomMap* TestingProfile::GetHostZoomMap() { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { | 782 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { |
793 return GetExtensionSpecialStoragePolicy(); | 783 return GetExtensionSpecialStoragePolicy(); |
794 } | 784 } |
795 | 785 |
796 void TestingProfile::DestroyWebDataService() { | 786 void TestingProfile::DestroyWebDataService() { |
797 if (!web_data_service_.get()) | 787 if (!web_data_service_.get()) |
798 return; | 788 return; |
799 | 789 |
800 web_data_service_->Shutdown(); | 790 web_data_service_->Shutdown(); |
801 } | 791 } |
OLD | NEW |