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

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

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r175140) Created 7 years, 11 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 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_ 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_
6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 GetDownloadManagerDelegate() OVERRIDE; 178 GetDownloadManagerDelegate() OVERRIDE;
179 // Returns a testing ContextGetter (if one has been created via 179 // Returns a testing ContextGetter (if one has been created via
180 // CreateRequestContext) or NULL. This is not done on-demand for two reasons: 180 // CreateRequestContext) or NULL. This is not done on-demand for two reasons:
181 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because 181 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because
182 // of the special memory management considerations for the 182 // of the special memory management considerations for the
183 // TestURLRequestContextGetter class, many tests would find themseleves 183 // TestURLRequestContextGetter class, many tests would find themseleves
184 // leaking if they called this method without the necessary IO thread. This 184 // leaking if they called this method without the necessary IO thread. This
185 // getter is currently only capable of returning a Context that helps test 185 // getter is currently only capable of returning a Context that helps test
186 // the CookieMonster. See implementation comments for more details. 186 // the CookieMonster. See implementation comments for more details.
187 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; 187 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
188 virtual net::URLRequestContextGetter* CreateRequestContext(
189 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
190 blob_protocol_handler,
191 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
192 file_system_protocol_handler,
193 scoped_ptr<net::URLRequestJobFactory::Interceptor>
194 developer_protocol_handler) OVERRIDE;
188 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 195 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
189 int renderer_child_id) OVERRIDE; 196 int renderer_child_id) OVERRIDE;
190 virtual content::ResourceContext* GetResourceContext() OVERRIDE; 197 virtual content::ResourceContext* GetResourceContext() OVERRIDE;
191 virtual content::GeolocationPermissionContext* 198 virtual content::GeolocationPermissionContext*
192 GetGeolocationPermissionContext() OVERRIDE; 199 GetGeolocationPermissionContext() OVERRIDE;
193 virtual content::SpeechRecognitionPreferences* 200 virtual content::SpeechRecognitionPreferences*
194 GetSpeechRecognitionPreferences() OVERRIDE; 201 GetSpeechRecognitionPreferences() OVERRIDE;
195 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; 202 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
196 203
197 virtual TestingProfile* AsTestingProfile() OVERRIDE; 204 virtual TestingProfile* AsTestingProfile() OVERRIDE;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 239
233 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; 240 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE;
234 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( 241 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
235 int renderer_child_id) OVERRIDE; 242 int renderer_child_id) OVERRIDE;
236 virtual net::URLRequestContextGetter* 243 virtual net::URLRequestContextGetter*
237 GetRequestContextForExtensions() OVERRIDE; 244 GetRequestContextForExtensions() OVERRIDE;
238 virtual net::URLRequestContextGetter* 245 virtual net::URLRequestContextGetter*
239 GetMediaRequestContextForStoragePartition( 246 GetMediaRequestContextForStoragePartition(
240 const FilePath& partition_path, 247 const FilePath& partition_path,
241 bool in_memory) OVERRIDE; 248 bool in_memory) OVERRIDE;
242 virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition( 249 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
243 const FilePath& partition_path, 250 const FilePath& partition_path,
244 bool in_memory) OVERRIDE; 251 bool in_memory,
252 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
253 blob_protocol_handler,
254 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
255 file_system_protocol_handler,
256 scoped_ptr<net::URLRequestJobFactory::Interceptor>
257 developer_protocol_handler) OVERRIDE;
245 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE; 258 virtual net::SSLConfigService* GetSSLConfigService() OVERRIDE;
246 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE; 259 virtual HostContentSettingsMap* GetHostContentSettingsMap() OVERRIDE;
247 virtual std::wstring GetName(); 260 virtual std::wstring GetName();
248 virtual void SetName(const std::wstring& name) {} 261 virtual void SetName(const std::wstring& name) {}
249 virtual std::wstring GetID(); 262 virtual std::wstring GetID();
250 virtual void SetID(const std::wstring& id); 263 virtual void SetID(const std::wstring& id);
251 void set_last_session_exited_cleanly(bool value) { 264 void set_last_session_exited_cleanly(bool value) {
252 last_session_exited_cleanly_ = value; 265 last_session_exited_cleanly_ = value;
253 } 266 }
254 virtual void MergeResourceString(int message_id, 267 virtual void MergeResourceString(int message_id,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 // testing. 368 // testing.
356 ProfileDependencyManager* profile_dependency_manager_; 369 ProfileDependencyManager* profile_dependency_manager_;
357 370
358 scoped_ptr<content::MockResourceContext> resource_context_; 371 scoped_ptr<content::MockResourceContext> resource_context_;
359 372
360 // Weak pointer to a delegate for indicating that a profile was created. 373 // Weak pointer to a delegate for indicating that a profile was created.
361 Delegate* delegate_; 374 Delegate* delegate_;
362 }; 375 };
363 376
364 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ 377 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698