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" |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 return GetRequestContext(); | 830 return GetRequestContext(); |
831 } | 831 } |
832 | 832 |
833 content::ResourceContext* TestingProfile::GetResourceContext() { | 833 content::ResourceContext* TestingProfile::GetResourceContext() { |
834 if (!resource_context_) | 834 if (!resource_context_) |
835 resource_context_ = new content::MockResourceContext(); | 835 resource_context_ = new content::MockResourceContext(); |
836 return resource_context_; | 836 return resource_context_; |
837 } | 837 } |
838 | 838 |
839 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { | 839 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { |
| 840 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
840 if (!host_content_settings_map_.get()) { | 841 if (!host_content_settings_map_.get()) { |
841 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); | 842 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); |
842 #if defined(ENABLE_EXTENSIONS) | 843 #if defined(ENABLE_EXTENSIONS) |
843 ExtensionService* extension_service = | 844 ExtensionService* extension_service = |
844 extensions::ExtensionSystem::Get(this)->extension_service(); | 845 extensions::ExtensionSystem::Get(this)->extension_service(); |
845 if (extension_service) { | 846 if (extension_service) { |
846 extension_service->RegisterContentSettings( | 847 extension_service->RegisterContentSettings( |
847 host_content_settings_map_.get()); | 848 host_content_settings_map_.get()); |
848 } | 849 } |
849 #endif | 850 #endif |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 #if defined(ENABLE_EXTENSIONS) | 1030 #if defined(ENABLE_EXTENSIONS) |
1030 extension_policy_, | 1031 extension_policy_, |
1031 #endif | 1032 #endif |
1032 pref_service_.Pass(), | 1033 pref_service_.Pass(), |
1033 original_profile, | 1034 original_profile, |
1034 guest_session_, | 1035 guest_session_, |
1035 supervised_user_id_, | 1036 supervised_user_id_, |
1036 policy_service_.Pass(), | 1037 policy_service_.Pass(), |
1037 testing_factories_); | 1038 testing_factories_); |
1038 } | 1039 } |
OLD | NEW |