| OLD | NEW |
| 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" |
| 11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| 12 #include "base/message_loop/message_loop_proxy.h" | 12 #include "base/message_loop/message_loop_proxy.h" |
| 13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 #include "base/prefs/testing_pref_store.h" | 14 #include "base/prefs/testing_pref_store.h" |
| 15 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
| 16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
| 17 #include "chrome/browser/autocomplete/autocomplete_classifier.h" | 17 #include "chrome/browser/autocomplete/autocomplete_classifier.h" |
| 18 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 18 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 19 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" | 19 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" |
| 20 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
| 21 #include "chrome/browser/chrome_notification_types.h" | 21 #include "chrome/browser/chrome_notification_types.h" |
| 22 #include "chrome/browser/content_settings/host_content_settings_map.h" | 22 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 23 #include "chrome/browser/extensions/extension_service.h" | 23 #include "chrome/browser/extensions/extension_service.h" |
| 24 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 24 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
| 25 #include "chrome/browser/extensions/extension_system_factory.h" | 25 #include "chrome/browser/extensions/extension_system_factory.h" |
| 26 #include "chrome/browser/extensions/test_extension_system.h" | 26 #include "chrome/browser/extensions/test_extension_system.h" |
| 27 #include "chrome/browser/favicon/favicon_service.h" | 27 #include "chrome/browser/favicon/favicon_service.h" |
| 28 #include "chrome/browser/favicon/favicon_service_factory.h" | 28 #include "chrome/browser/favicon/favicon_service_factory.h" |
| 29 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" | |
| 30 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto
ry.h" | |
| 31 #include "chrome/browser/history/chrome_history_client.h" | 29 #include "chrome/browser/history/chrome_history_client.h" |
| 32 #include "chrome/browser/history/chrome_history_client_factory.h" | 30 #include "chrome/browser/history/chrome_history_client_factory.h" |
| 33 #include "chrome/browser/history/history_backend.h" | 31 #include "chrome/browser/history/history_backend.h" |
| 34 #include "chrome/browser/history/history_db_task.h" | 32 #include "chrome/browser/history/history_db_task.h" |
| 35 #include "chrome/browser/history/history_service.h" | 33 #include "chrome/browser/history/history_service.h" |
| 36 #include "chrome/browser/history/history_service_factory.h" | 34 #include "chrome/browser/history/history_service_factory.h" |
| 37 #include "chrome/browser/history/top_sites.h" | 35 #include "chrome/browser/history/top_sites.h" |
| 38 #include "chrome/browser/history/web_history_service_factory.h" | 36 #include "chrome/browser/history/web_history_service_factory.h" |
| 39 #include "chrome/browser/net/pref_proxy_config_tracker.h" | 37 #include "chrome/browser/net/pref_proxy_config_tracker.h" |
| 40 #include "chrome/browser/net/proxy_service_factory.h" | 38 #include "chrome/browser/net/proxy_service_factory.h" |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); | 825 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); |
| 828 #if defined(ENABLE_EXTENSIONS) | 826 #if defined(ENABLE_EXTENSIONS) |
| 829 ExtensionService* extension_service = GetExtensionService(); | 827 ExtensionService* extension_service = GetExtensionService(); |
| 830 if (extension_service) | 828 if (extension_service) |
| 831 host_content_settings_map_->RegisterExtensionService(extension_service); | 829 host_content_settings_map_->RegisterExtensionService(extension_service); |
| 832 #endif | 830 #endif |
| 833 } | 831 } |
| 834 return host_content_settings_map_.get(); | 832 return host_content_settings_map_.get(); |
| 835 } | 833 } |
| 836 | 834 |
| 837 content::GeolocationPermissionContext* | |
| 838 TestingProfile::GetGeolocationPermissionContext() { | |
| 839 return ChromeGeolocationPermissionContextFactory::GetForProfile(this); | |
| 840 } | |
| 841 | |
| 842 content::BrowserPluginGuestManager* TestingProfile::GetGuestManager() { | 835 content::BrowserPluginGuestManager* TestingProfile::GetGuestManager() { |
| 843 #if defined(ENABLE_EXTENSIONS) | 836 #if defined(ENABLE_EXTENSIONS) |
| 844 return GuestViewManager::FromBrowserContext(this); | 837 return GuestViewManager::FromBrowserContext(this); |
| 845 #else | 838 #else |
| 846 return NULL; | 839 return NULL; |
| 847 #endif | 840 #endif |
| 848 } | 841 } |
| 849 | 842 |
| 850 content::PushMessagingService* TestingProfile::GetPushMessagingService() { | 843 content::PushMessagingService* TestingProfile::GetPushMessagingService() { |
| 851 return NULL; | 844 return NULL; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 path_, | 989 path_, |
| 997 delegate_, | 990 delegate_, |
| 998 extension_policy_, | 991 extension_policy_, |
| 999 pref_service_.Pass(), | 992 pref_service_.Pass(), |
| 1000 incognito_, | 993 incognito_, |
| 1001 guest_session_, | 994 guest_session_, |
| 1002 supervised_user_id_, | 995 supervised_user_id_, |
| 1003 policy_service_.Pass(), | 996 policy_service_.Pass(), |
| 1004 testing_factories_)); | 997 testing_factories_)); |
| 1005 } | 998 } |
| OLD | NEW |