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_special_storage_policy.h" | 22 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
23 #include "chrome/browser/favicon/favicon_service.h" | 23 #include "chrome/browser/favicon/favicon_service.h" |
24 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" | 24 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" |
25 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" | |
26 #include "chrome/browser/history/history.h" | 25 #include "chrome/browser/history/history.h" |
27 #include "chrome/browser/history/history_backend.h" | 26 #include "chrome/browser/history/history_backend.h" |
28 #include "chrome/browser/history/top_sites.h" | 27 #include "chrome/browser/history/top_sites.h" |
29 #include "chrome/browser/net/gaia/token_service.h" | 28 #include "chrome/browser/net/gaia/token_service.h" |
30 #include "chrome/browser/net/pref_proxy_config_service.h" | 29 #include "chrome/browser/net/pref_proxy_config_service.h" |
31 #include "chrome/browser/notifications/desktop_notification_service.h" | 30 #include "chrome/browser/notifications/desktop_notification_service.h" |
32 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 31 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
33 #include "chrome/browser/prefs/browser_prefs.h" | 32 #include "chrome/browser/prefs/browser_prefs.h" |
34 #include "chrome/browser/prefs/testing_pref_store.h" | 33 #include "chrome/browser/prefs/testing_pref_store.h" |
35 #include "chrome/browser/prerender/prerender_manager.h" | 34 #include "chrome/browser/prerender/prerender_manager.h" |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 } | 620 } |
622 | 621 |
623 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { | 622 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { |
624 if (!host_content_settings_map_.get()) { | 623 if (!host_content_settings_map_.get()) { |
625 host_content_settings_map_ = new HostContentSettingsMap( | 624 host_content_settings_map_ = new HostContentSettingsMap( |
626 GetPrefs(), GetExtensionService(), false); | 625 GetPrefs(), GetExtensionService(), false); |
627 } | 626 } |
628 return host_content_settings_map_.get(); | 627 return host_content_settings_map_.get(); |
629 } | 628 } |
630 | 629 |
631 GeolocationContentSettingsMap* | |
632 TestingProfile::GetGeolocationContentSettingsMap() { | |
633 if (!geolocation_content_settings_map_.get()) { | |
634 geolocation_content_settings_map_ = | |
635 new GeolocationContentSettingsMap(this); | |
636 } | |
637 return geolocation_content_settings_map_.get(); | |
638 } | |
639 | |
640 GeolocationPermissionContext* | 630 GeolocationPermissionContext* |
641 TestingProfile::GetGeolocationPermissionContext() { | 631 TestingProfile::GetGeolocationPermissionContext() { |
642 if (!geolocation_permission_context_.get()) { | 632 if (!geolocation_permission_context_.get()) { |
643 geolocation_permission_context_ = | 633 geolocation_permission_context_ = |
644 new ChromeGeolocationPermissionContext(this); | 634 new ChromeGeolocationPermissionContext(this); |
645 } | 635 } |
646 return geolocation_permission_context_.get(); | 636 return geolocation_permission_context_.get(); |
647 } | 637 } |
648 | 638 |
649 HostZoomMap* TestingProfile::GetHostZoomMap() { | 639 HostZoomMap* TestingProfile::GetHostZoomMap() { |
(...skipping 142 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 |