Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 9425026: Remove getters for HTML5 related objects from the ResourceContext interface. Half of them weren't u… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix race condition Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 } 621 }
622 622
623 net::URLRequestContextGetter* TestingProfile::GetRequestContextForIsolatedApp( 623 net::URLRequestContextGetter* TestingProfile::GetRequestContextForIsolatedApp(
624 const std::string& app_id) { 624 const std::string& app_id) {
625 // We don't test isolated app storage here yet, so returning the same dummy 625 // We don't test isolated app storage here yet, so returning the same dummy
626 // context is sufficient for now. 626 // context is sufficient for now.
627 return GetRequestContext(); 627 return GetRequestContext();
628 } 628 }
629 629
630 content::ResourceContext* TestingProfile::GetResourceContext() { 630 content::ResourceContext* TestingProfile::GetResourceContext() {
631 return content::MockResourceContext::GetInstance(); 631 if (!resource_context_.get())
632 resource_context_.reset(new content::MockResourceContext());
633 return resource_context_.get();
632 } 634 }
633 635
634 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { 636 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() {
635 if (!host_content_settings_map_.get()) { 637 if (!host_content_settings_map_.get()) {
636 host_content_settings_map_ = new HostContentSettingsMap( 638 host_content_settings_map_ = new HostContentSettingsMap(
637 GetPrefs(), GetExtensionService(), false); 639 GetPrefs(), GetExtensionService(), false);
638 } 640 }
639 return host_content_settings_map_.get(); 641 return host_content_settings_map_.get();
640 } 642 }
641 643
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() { 763 quota::SpecialStoragePolicy* TestingProfile::GetSpecialStoragePolicy() {
762 return GetExtensionSpecialStoragePolicy(); 764 return GetExtensionSpecialStoragePolicy();
763 } 765 }
764 766
765 void TestingProfile::DestroyWebDataService() { 767 void TestingProfile::DestroyWebDataService() {
766 if (!web_data_service_.get()) 768 if (!web_data_service_.get())
767 return; 769 return;
768 770
769 web_data_service_->Shutdown(); 771 web_data_service_->Shutdown();
770 } 772 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698