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

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

Issue 6825038: Create a content::ResourceContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix dependencies. Created 9 years, 8 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) 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/testing_profile.h" 5 #include "chrome/test/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 28 matching lines...) Expand all
39 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 39 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
40 #include "chrome/browser/ui/webui/ntp_resource_cache.h" 40 #include "chrome/browser/ui/webui/ntp_resource_cache.h"
41 #include "chrome/common/chrome_constants.h" 41 #include "chrome/common/chrome_constants.h"
42 #include "chrome/common/url_constants.h" 42 #include "chrome/common/url_constants.h"
43 #include "chrome/test/test_url_request_context_getter.h" 43 #include "chrome/test/test_url_request_context_getter.h"
44 #include "chrome/test/testing_pref_service.h" 44 #include "chrome/test/testing_pref_service.h"
45 #include "chrome/test/ui_test_utils.h" 45 #include "chrome/test/ui_test_utils.h"
46 #include "content/browser/browser_thread.h" 46 #include "content/browser/browser_thread.h"
47 #include "content/browser/geolocation/geolocation_permission_context.h" 47 #include "content/browser/geolocation/geolocation_permission_context.h"
48 #include "content/browser/in_process_webkit/webkit_context.h" 48 #include "content/browser/in_process_webkit/webkit_context.h"
49 #include "content/browser/mock_resource_context.h"
49 #include "content/common/notification_service.h" 50 #include "content/common/notification_service.h"
50 #include "net/base/cookie_monster.h" 51 #include "net/base/cookie_monster.h"
51 #include "net/url_request/url_request_context.h" 52 #include "net/url_request/url_request_context.h"
52 #include "net/url_request/url_request_context_getter.h" 53 #include "net/url_request/url_request_context_getter.h"
53 #include "net/url_request/url_request_test_util.h" 54 #include "net/url_request/url_request_test_util.h"
54 #include "testing/gmock/include/gmock/gmock.h" 55 #include "testing/gmock/include/gmock/gmock.h"
55 #include "webkit/database/database_tracker.h" 56 #include "webkit/database/database_tracker.h"
56 57
57 using base::Time; 58 using base::Time;
58 using testing::NiceMock; 59 using testing::NiceMock;
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 return NULL; 577 return NULL;
577 } 578 }
578 579
579 net::URLRequestContextGetter* TestingProfile::GetRequestContextForIsolatedApp( 580 net::URLRequestContextGetter* TestingProfile::GetRequestContextForIsolatedApp(
580 const std::string& app_id) { 581 const std::string& app_id) {
581 // We don't test isolated app storage here yet, so returning the same dummy 582 // We don't test isolated app storage here yet, so returning the same dummy
582 // context is sufficient for now. 583 // context is sufficient for now.
583 return GetRequestContext(); 584 return GetRequestContext();
584 } 585 }
585 586
587 const content::ResourceContext& TestingProfile::GetResourceContext() {
588 return content::MockResourceContext::GetInstance();
589 }
590
586 FindBarState* TestingProfile::GetFindBarState() { 591 FindBarState* TestingProfile::GetFindBarState() {
587 if (!find_bar_state_.get()) 592 if (!find_bar_state_.get())
588 find_bar_state_.reset(new FindBarState()); 593 find_bar_state_.reset(new FindBarState());
589 return find_bar_state_.get(); 594 return find_bar_state_.get();
590 } 595 }
591 596
592 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() { 597 HostContentSettingsMap* TestingProfile::GetHostContentSettingsMap() {
593 if (!host_content_settings_map_.get()) 598 if (!host_content_settings_map_.get())
594 host_content_settings_map_ = new HostContentSettingsMap(this); 599 host_content_settings_map_ = new HostContentSettingsMap(this);
595 return host_content_settings_map_.get(); 600 return host_content_settings_map_.get();
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 } 813 }
809 814
810 DerivedTestingProfile::DerivedTestingProfile(Profile* profile) 815 DerivedTestingProfile::DerivedTestingProfile(Profile* profile)
811 : original_profile_(profile) {} 816 : original_profile_(profile) {}
812 817
813 DerivedTestingProfile::~DerivedTestingProfile() {} 818 DerivedTestingProfile::~DerivedTestingProfile() {}
814 819
815 ProfileId DerivedTestingProfile::GetRuntimeId() { 820 ProfileId DerivedTestingProfile::GetRuntimeId() {
816 return original_profile_->GetRuntimeId(); 821 return original_profile_->GetRuntimeId();
817 } 822 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698