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" |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 if (!find_bar_state_.get()) | 621 if (!find_bar_state_.get()) |
622 find_bar_state_.reset(new FindBarState()); | 622 find_bar_state_.reset(new FindBarState()); |
623 return find_bar_state_.get(); | 623 return find_bar_state_.get(); |
624 } | 624 } |
625 | 625 |
626 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { | 626 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { |
627 if (!host_content_settings_map_.get()) { | 627 if (!host_content_settings_map_.get()) { |
628 host_content_settings_map_ = new HostContentSettingsMap( | 628 host_content_settings_map_ = new HostContentSettingsMap( |
629 GetPrefs(), GetExtensionService(), false); | 629 GetPrefs(), GetExtensionService(), false); |
630 } | 630 } |
| 631 if (!cookie_content_settings_.get()) { |
| 632 cookie_content_settings_ = new CookieContentSettings( |
| 633 host_content_settings_map_.get(), GetPrefs(), false); |
| 634 } |
631 return host_content_settings_map_.get(); | 635 return host_content_settings_map_.get(); |
632 } | 636 } |
633 | 637 |
| 638 CookieContentSettings* TestingProfile::GetCookieContentSettings() { |
| 639 GetHostContentSettingsMap(); |
| 640 return cookie_content_settings_.get(); |
| 641 } |
| 642 |
634 GeolocationPermissionContext* | 643 GeolocationPermissionContext* |
635 TestingProfile::GetGeolocationPermissionContext() { | 644 TestingProfile::GetGeolocationPermissionContext() { |
636 if (!geolocation_permission_context_.get()) { | 645 if (!geolocation_permission_context_.get()) { |
637 geolocation_permission_context_ = | 646 geolocation_permission_context_ = |
638 new ChromeGeolocationPermissionContext(this); | 647 new ChromeGeolocationPermissionContext(this); |
639 } | 648 } |
640 return geolocation_permission_context_.get(); | 649 return geolocation_permission_context_.get(); |
641 } | 650 } |
642 | 651 |
643 HostZoomMap* TestingProfile::GetHostZoomMap() { | 652 HostZoomMap* TestingProfile::GetHostZoomMap() { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { | 791 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { |
783 return GetExtensionSpecialStoragePolicy(); | 792 return GetExtensionSpecialStoragePolicy(); |
784 } | 793 } |
785 | 794 |
786 void TestingProfile::DestroyWebDataService() { | 795 void TestingProfile::DestroyWebDataService() { |
787 if (!web_data_service_.get()) | 796 if (!web_data_service_.get()) |
788 return; | 797 return; |
789 | 798 |
790 web_data_service_->Shutdown(); | 799 web_data_service_->Shutdown(); |
791 } | 800 } |
OLD | NEW |