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

Side by Side Diff: content/public/test/test_browser_context.cc

Issue 10909182: Make FileSystemContext respect StoragePartitions. filesystem:// urls will be properly isolated (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch unittest fix from michael Created 8 years, 3 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 "content/public/test/test_browser_context.h" 5 #include "content/public/test/test_browser_context.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "content/public/test/mock_resource_context.h" 8 #include "content/public/test/mock_resource_context.h"
9 #include "net/url_request/url_request_context.h" 9 #include "net/url_request/url_request_context.h"
10 #include "net/url_request/url_request_context_getter.h" 10 #include "net/url_request/url_request_context_getter.h"
(...skipping 18 matching lines...) Expand all
29 return false; 29 return false;
30 } 30 }
31 31
32 virtual bool PostNonNestableDelayedTask( 32 virtual bool PostNonNestableDelayedTask(
33 const tracked_objects::Location& from_here, 33 const tracked_objects::Location& from_here,
34 const base::Closure& task, 34 const base::Closure& task,
35 base::TimeDelta delay) OVERRIDE { 35 base::TimeDelta delay) OVERRIDE {
36 NOTREACHED(); 36 NOTREACHED();
37 return false; 37 return false;
38 } 38 }
39
40 private:
41 ~AnyThreadNonTaskRunner() {
42 }
39 }; 43 };
40 44
41 class TestContextURLRequestContextGetter : public net::URLRequestContextGetter { 45 class TestContextURLRequestContextGetter : public net::URLRequestContextGetter {
42 public: 46 public:
43 TestContextURLRequestContextGetter(net::URLRequestContext* context) 47 TestContextURLRequestContextGetter(net::URLRequestContext* context)
44 : context_(context), 48 : context_(context),
45 any_thread_non_task_runner_(new AnyThreadNonTaskRunner) { 49 any_thread_non_task_runner_(new AnyThreadNonTaskRunner) {
46 } 50 }
47 51
48 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE { 52 virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 net::URLRequestContextGetter* TestBrowserContext::GetMediaRequestContext() { 118 net::URLRequestContextGetter* TestBrowserContext::GetMediaRequestContext() {
115 return NULL; 119 return NULL;
116 } 120 }
117 121
118 net::URLRequestContextGetter* 122 net::URLRequestContextGetter*
119 TestBrowserContext::GetMediaRequestContextForRenderProcess( 123 TestBrowserContext::GetMediaRequestContextForRenderProcess(
120 int renderer_child_id) { 124 int renderer_child_id) {
121 return NULL; 125 return NULL;
122 } 126 }
123 127
128 net::URLRequestContextGetter*
129 TestBrowserContext::GetMediaRequestContextForStoragePartition(
130 const std::string& partition_id) {
131 return NULL;
132 }
133
124 ResourceContext* TestBrowserContext::GetResourceContext() { 134 ResourceContext* TestBrowserContext::GetResourceContext() {
125 if (!resource_context_.get()) 135 if (!resource_context_.get())
126 resource_context_.reset(new MockResourceContext()); 136 resource_context_.reset(new MockResourceContext());
127 return resource_context_.get(); 137 return resource_context_.get();
128 } 138 }
129 139
130 GeolocationPermissionContext* 140 GeolocationPermissionContext*
131 TestBrowserContext::GetGeolocationPermissionContext() { 141 TestBrowserContext::GetGeolocationPermissionContext() {
132 return NULL; 142 return NULL;
133 } 143 }
134 144
135 SpeechRecognitionPreferences* 145 SpeechRecognitionPreferences*
136 TestBrowserContext::GetSpeechRecognitionPreferences() { 146 TestBrowserContext::GetSpeechRecognitionPreferences() {
137 return NULL; 147 return NULL;
138 } 148 }
139 149
140 bool TestBrowserContext::DidLastSessionExitCleanly() { 150 bool TestBrowserContext::DidLastSessionExitCleanly() {
141 return true; 151 return true;
142 } 152 }
143 153
144 quota::SpecialStoragePolicy* TestBrowserContext::GetSpecialStoragePolicy() { 154 quota::SpecialStoragePolicy* TestBrowserContext::GetSpecialStoragePolicy() {
145 return special_storage_policy_.get(); 155 return special_storage_policy_.get();
146 } 156 }
147 157
148 } // namespace content 158 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698