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" |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 return NULL; | 650 return NULL; |
651 } | 651 } |
652 | 652 |
653 net::URLRequestContextGetter* TestingProfile::GetRequestContextForIsolatedApp( | 653 net::URLRequestContextGetter* TestingProfile::GetRequestContextForIsolatedApp( |
654 const std::string& app_id) { | 654 const std::string& app_id) { |
655 // We don't test isolated app storage here yet, so returning the same dummy | 655 // We don't test isolated app storage here yet, so returning the same dummy |
656 // context is sufficient for now. | 656 // context is sufficient for now. |
657 return GetRequestContext(); | 657 return GetRequestContext(); |
658 } | 658 } |
659 | 659 |
660 content::ResourceContext* TestingProfile::GetResourceContext() { | 660 content::ResourceContext* TestingProfile::GetResourceContext( |
| 661 content::SiteInstance* instance) { |
661 if (!resource_context_.get()) | 662 if (!resource_context_.get()) |
662 resource_context_.reset(new content::MockResourceContext()); | 663 resource_context_.reset(new content::MockResourceContext()); |
663 return resource_context_.get(); | 664 return resource_context_.get(); |
664 } | 665 } |
665 | 666 |
666 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { | 667 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { |
667 if (!host_content_settings_map_.get()) { | 668 if (!host_content_settings_map_.get()) { |
668 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); | 669 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); |
669 ExtensionService* extension_service = GetExtensionService(); | 670 ExtensionService* extension_service = GetExtensionService(); |
670 if (extension_service) | 671 if (extension_service) |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { | 809 scoped_ptr<TestingProfile> TestingProfile::Builder::Build() { |
809 DCHECK(!build_called_); | 810 DCHECK(!build_called_); |
810 build_called_ = true; | 811 build_called_ = true; |
811 return scoped_ptr<TestingProfile>(new TestingProfile( | 812 return scoped_ptr<TestingProfile>(new TestingProfile( |
812 path_, | 813 path_, |
813 delegate_, | 814 delegate_, |
814 extension_policy_, | 815 extension_policy_, |
815 pref_service_.Pass(), | 816 pref_service_.Pass(), |
816 user_cloud_policy_manager_.Pass())); | 817 user_cloud_policy_manager_.Pass())); |
817 } | 818 } |
818 | |
819 | |
OLD | NEW |