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

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

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move ShellResourceContext into .cc file Created 8 years 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 CONTENT_PUBLIC_TEST_TEST_BROWSER_CONTEXT_H_ 5 #ifndef CONTENT_PUBLIC_TEST_TEST_BROWSER_CONTEXT_H_
6 #define CONTENT_PUBLIC_TEST_TEST_BROWSER_CONTEXT_H_ 6 #define CONTENT_PUBLIC_TEST_TEST_BROWSER_CONTEXT_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 13 matching lines...) Expand all
24 // Takes ownership of the temporary directory so that it's not deleted when 24 // Takes ownership of the temporary directory so that it's not deleted when
25 // this object is destructed. 25 // this object is destructed.
26 FilePath TakePath(); 26 FilePath TakePath();
27 27
28 void SetSpecialStoragePolicy(quota::SpecialStoragePolicy* policy); 28 void SetSpecialStoragePolicy(quota::SpecialStoragePolicy* policy);
29 29
30 virtual FilePath GetPath() OVERRIDE; 30 virtual FilePath GetPath() OVERRIDE;
31 virtual bool IsOffTheRecord() const OVERRIDE; 31 virtual bool IsOffTheRecord() const OVERRIDE;
32 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE; 32 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE;
33 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; 33 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
34 virtual net::URLRequestContextGetter* CreateRequestContext(
35 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
36 blob_protocol_handler,
37 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
38 file_system_protocol_handler,
39 scoped_ptr<net::URLRequestJobFactory::Interceptor>
40 developer_protocol_handler) OVERRIDE;
34 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 41 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
35 int renderer_child_id) OVERRIDE; 42 int renderer_child_id) OVERRIDE;
36 virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition( 43 virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
37 const FilePath& partition_path, 44 const FilePath& partition_path,
38 bool in_memory) OVERRIDE; 45 bool in_memory,
46 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
47 blob_protocol_handler,
48 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
49 file_system_protocol_handler,
50 scoped_ptr<net::URLRequestJobFactory::Interceptor>
51 developer_protocol_handler) OVERRIDE;
39 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; 52 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE;
40 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( 53 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
41 int renderer_child_id) OVERRIDE; 54 int renderer_child_id) OVERRIDE;
42 virtual net::URLRequestContextGetter* 55 virtual net::URLRequestContextGetter*
43 GetMediaRequestContextForStoragePartition( 56 GetMediaRequestContextForStoragePartition(
44 const FilePath& partition_path, 57 const FilePath& partition_path,
45 bool in_memory) OVERRIDE; 58 bool in_memory) OVERRIDE;
46 virtual ResourceContext* GetResourceContext() OVERRIDE; 59 virtual ResourceContext* GetResourceContext() OVERRIDE;
47 virtual GeolocationPermissionContext* 60 virtual GeolocationPermissionContext*
48 GetGeolocationPermissionContext() OVERRIDE; 61 GetGeolocationPermissionContext() OVERRIDE;
49 virtual SpeechRecognitionPreferences* 62 virtual SpeechRecognitionPreferences*
50 GetSpeechRecognitionPreferences() OVERRIDE; 63 GetSpeechRecognitionPreferences() OVERRIDE;
51 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; 64 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
52 65
53 private: 66 private:
54 FRIEND_TEST_ALL_PREFIXES(DOMStorageTest, SessionOnly); 67 FRIEND_TEST_ALL_PREFIXES(DOMStorageTest, SessionOnly);
55 FRIEND_TEST_ALL_PREFIXES(DOMStorageTest, SaveSessionState); 68 FRIEND_TEST_ALL_PREFIXES(DOMStorageTest, SaveSessionState);
56 69
57 scoped_refptr<net::URLRequestContextGetter> request_context_; 70 scoped_refptr<net::URLRequestContextGetter> request_context_;
58 scoped_ptr<MockResourceContext> resource_context_; 71 scoped_ptr<MockResourceContext> resource_context_;
59 base::ScopedTempDir browser_context_dir_; 72 base::ScopedTempDir browser_context_dir_;
60 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; 73 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
61 74
62 DISALLOW_COPY_AND_ASSIGN(TestBrowserContext); 75 DISALLOW_COPY_AND_ASSIGN(TestBrowserContext);
63 }; 76 };
64 77
65 } // namespace content 78 } // namespace content
66 79
67 #endif // CONTENT_PUBLIC_TEST_TEST_BROWSER_CONTEXT_H_ 80 #endif // CONTENT_PUBLIC_TEST_TEST_BROWSER_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698