| 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 "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
| 10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/prefs/testing_pref_store.h" | 12 #include "base/prefs/testing_pref_store.h" |
| 13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/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_factory.h" | 16 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 17 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" | 17 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" |
| 18 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" | 18 #include "chrome/browser/bookmarks/chrome_bookmark_client_factory.h" |
| 19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
| 20 #include "chrome/browser/chrome_notification_types.h" | 20 #include "chrome/browser/chrome_notification_types.h" |
| 21 #include "chrome/browser/content_settings/host_content_settings_map.h" | 21 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 22 #include "chrome/browser/extensions/extension_service.h" |
| 22 #include "chrome/browser/favicon/chrome_favicon_client_factory.h" | 23 #include "chrome/browser/favicon/chrome_favicon_client_factory.h" |
| 23 #include "chrome/browser/favicon/favicon_service.h" | 24 #include "chrome/browser/favicon/favicon_service.h" |
| 24 #include "chrome/browser/favicon/favicon_service_factory.h" | 25 #include "chrome/browser/favicon/favicon_service_factory.h" |
| 25 #include "chrome/browser/history/chrome_history_client.h" | 26 #include "chrome/browser/history/chrome_history_client.h" |
| 26 #include "chrome/browser/history/chrome_history_client_factory.h" | 27 #include "chrome/browser/history/chrome_history_client_factory.h" |
| 27 #include "chrome/browser/history/history_backend.h" | 28 #include "chrome/browser/history/history_backend.h" |
| 28 #include "chrome/browser/history/history_db_task.h" | 29 #include "chrome/browser/history/history_db_task.h" |
| 29 #include "chrome/browser/history/history_service.h" | 30 #include "chrome/browser/history/history_service.h" |
| 30 #include "chrome/browser/history/history_service_factory.h" | 31 #include "chrome/browser/history/history_service_factory.h" |
| 31 #include "chrome/browser/history/top_sites.h" | 32 #include "chrome/browser/history/top_sites.h" |
| (...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 resource_context_ = new content::MockResourceContext(); | 805 resource_context_ = new content::MockResourceContext(); |
| 805 return resource_context_; | 806 return resource_context_; |
| 806 } | 807 } |
| 807 | 808 |
| 808 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { | 809 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { |
| 809 if (!host_content_settings_map_.get()) { | 810 if (!host_content_settings_map_.get()) { |
| 810 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); | 811 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); |
| 811 #if defined(ENABLE_EXTENSIONS) | 812 #if defined(ENABLE_EXTENSIONS) |
| 812 ExtensionService* extension_service = | 813 ExtensionService* extension_service = |
| 813 extensions::ExtensionSystem::Get(this)->extension_service(); | 814 extensions::ExtensionSystem::Get(this)->extension_service(); |
| 814 if (extension_service) | 815 if (extension_service) { |
| 815 host_content_settings_map_->RegisterExtensionService(extension_service); | 816 extension_service->RegisterContentSettings( |
| 817 host_content_settings_map_.get()); |
| 818 } |
| 816 #endif | 819 #endif |
| 817 } | 820 } |
| 818 return host_content_settings_map_.get(); | 821 return host_content_settings_map_.get(); |
| 819 } | 822 } |
| 820 | 823 |
| 821 content::BrowserPluginGuestManager* TestingProfile::GetGuestManager() { | 824 content::BrowserPluginGuestManager* TestingProfile::GetGuestManager() { |
| 822 #if defined(ENABLE_EXTENSIONS) | 825 #if defined(ENABLE_EXTENSIONS) |
| 823 return extensions::GuestViewManager::FromBrowserContext(this); | 826 return extensions::GuestViewManager::FromBrowserContext(this); |
| 824 #else | 827 #else |
| 825 return NULL; | 828 return NULL; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 #if defined(ENABLE_EXTENSIONS) | 985 #if defined(ENABLE_EXTENSIONS) |
| 983 extension_policy_, | 986 extension_policy_, |
| 984 #endif | 987 #endif |
| 985 pref_service_.Pass(), | 988 pref_service_.Pass(), |
| 986 incognito_, | 989 incognito_, |
| 987 guest_session_, | 990 guest_session_, |
| 988 supervised_user_id_, | 991 supervised_user_id_, |
| 989 policy_service_.Pass(), | 992 policy_service_.Pass(), |
| 990 testing_factories_)); | 993 testing_factories_)); |
| 991 } | 994 } |
| OLD | NEW |