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

Side by Side Diff: trunk/src/chrome/browser/profiles/profile_impl_io_data.h

Issue 23551005: Revert 219709 "Remove the Extensions URLRequestContext." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 18 matching lines...) Expand all
29 29
30 class ProfileImplIOData : public ProfileIOData { 30 class ProfileImplIOData : public ProfileIOData {
31 public: 31 public:
32 class Handle { 32 class Handle {
33 public: 33 public:
34 explicit Handle(Profile* profile); 34 explicit Handle(Profile* profile);
35 ~Handle(); 35 ~Handle();
36 36
37 // Init() must be called before ~Handle(). It records most of the 37 // Init() must be called before ~Handle(). It records most of the
38 // parameters needed to construct a ChromeURLRequestContextGetter. 38 // parameters needed to construct a ChromeURLRequestContextGetter.
39 void Init(const base::FilePath& server_bound_cert_path, 39 void Init(const base::FilePath& cookie_path,
40 const base::FilePath& server_bound_cert_path,
40 const base::FilePath& cache_path, 41 const base::FilePath& cache_path,
41 int cache_max_size, 42 int cache_max_size,
42 const base::FilePath& media_cache_path, 43 const base::FilePath& media_cache_path,
43 int media_cache_max_size, 44 int media_cache_max_size,
45 const base::FilePath& extensions_cookie_path,
44 const base::FilePath& profile_path, 46 const base::FilePath& profile_path,
45 const base::FilePath& infinite_cache_path, 47 const base::FilePath& infinite_cache_path,
46 chrome_browser_net::Predictor* predictor, 48 chrome_browser_net::Predictor* predictor,
49 bool restore_old_session_cookies,
47 quota::SpecialStoragePolicy* special_storage_policy); 50 quota::SpecialStoragePolicy* special_storage_policy);
48 51
49 // These Create*ContextGetter() functions are only exposed because the 52 // These Create*ContextGetter() functions are only exposed because the
50 // circular relationship between Profile, ProfileIOData::Handle, and the 53 // circular relationship between Profile, ProfileIOData::Handle, and the
51 // ChromeURLRequestContextGetter factories requires Profile be able to call 54 // ChromeURLRequestContextGetter factories requires Profile be able to call
52 // these functions. 55 // these functions.
53 scoped_refptr<ChromeURLRequestContextGetter> 56 scoped_refptr<ChromeURLRequestContextGetter>
54 CreateMainRequestContextGetter( 57 CreateMainRequestContextGetter(
55 content::ProtocolHandlerMap* protocol_handlers, 58 content::ProtocolHandlerMap* protocol_handlers,
56 PrefService* local_state, 59 PrefService* local_state,
57 IOThread* io_thread) const; 60 IOThread* io_thread) const;
58 scoped_refptr<ChromeURLRequestContextGetter> 61 scoped_refptr<ChromeURLRequestContextGetter>
59 CreateIsolatedAppRequestContextGetter( 62 CreateIsolatedAppRequestContextGetter(
60 const base::FilePath& partition_path, 63 const base::FilePath& partition_path,
61 bool in_memory, 64 bool in_memory,
62 content::ProtocolHandlerMap* protocol_handlers) const; 65 content::ProtocolHandlerMap* protocol_handlers) const;
63 66
64 content::ResourceContext* GetResourceContext() const; 67 content::ResourceContext* GetResourceContext() const;
65 // GetResourceContextNoInit() does not call LazyInitialize() so it can be 68 // GetResourceContextNoInit() does not call LazyInitialize() so it can be
66 // safely be used during initialization. 69 // safely be used during initialization.
67 content::ResourceContext* GetResourceContextNoInit() const; 70 content::ResourceContext* GetResourceContextNoInit() const;
68 scoped_refptr<ChromeURLRequestContextGetter> 71 scoped_refptr<ChromeURLRequestContextGetter>
69 GetMediaRequestContextGetter() const; 72 GetMediaRequestContextGetter() const;
70 scoped_refptr<ChromeURLRequestContextGetter> 73 scoped_refptr<ChromeURLRequestContextGetter>
74 GetExtensionsRequestContextGetter() const;
75 scoped_refptr<ChromeURLRequestContextGetter>
71 GetIsolatedMediaRequestContextGetter( 76 GetIsolatedMediaRequestContextGetter(
72 const base::FilePath& partition_path, 77 const base::FilePath& partition_path,
73 bool in_memory) const; 78 bool in_memory) const;
74 79
75 // Deletes all network related data since |time|. It deletes transport 80 // Deletes all network related data since |time|. It deletes transport
76 // security state since |time| and also deletes HttpServerProperties data. 81 // security state since |time| and also deletes HttpServerProperties data.
77 // Works asynchronously, however if the |completion| callback is non-null, 82 // Works asynchronously, however if the |completion| callback is non-null,
78 // it will be posted on the UI thread once the removal process completes. 83 // it will be posted on the UI thread once the removal process completes.
79 void ClearNetworkingHistorySince(base::Time time, 84 void ClearNetworkingHistorySince(base::Time time,
80 const base::Closure& completion); 85 const base::Closure& completion);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 }; 122 };
118 123
119 private: 124 private:
120 friend class base::RefCountedThreadSafe<ProfileImplIOData>; 125 friend class base::RefCountedThreadSafe<ProfileImplIOData>;
121 126
122 struct LazyParams { 127 struct LazyParams {
123 LazyParams(); 128 LazyParams();
124 ~LazyParams(); 129 ~LazyParams();
125 130
126 // All of these parameters are intended to be read on the IO thread. 131 // All of these parameters are intended to be read on the IO thread.
132 base::FilePath cookie_path;
127 base::FilePath server_bound_cert_path; 133 base::FilePath server_bound_cert_path;
128 base::FilePath cache_path; 134 base::FilePath cache_path;
129 int cache_max_size; 135 int cache_max_size;
130 base::FilePath media_cache_path; 136 base::FilePath media_cache_path;
131 int media_cache_max_size; 137 int media_cache_max_size;
138 base::FilePath extensions_cookie_path;
132 base::FilePath infinite_cache_path; 139 base::FilePath infinite_cache_path;
140 bool restore_old_session_cookies;
133 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy; 141 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy;
134 }; 142 };
135 143
136 typedef base::hash_map<std::string, net::HttpTransactionFactory* > 144 typedef base::hash_map<std::string, net::HttpTransactionFactory* >
137 HttpTransactionFactoryMap; 145 HttpTransactionFactoryMap;
138 146
139 ProfileImplIOData(); 147 ProfileImplIOData();
140 virtual ~ProfileImplIOData(); 148 virtual ~ProfileImplIOData();
141 149
142 virtual void InitializeInternal( 150 virtual void InitializeInternal(
143 ProfileParams* profile_params, 151 ProfileParams* profile_params,
144 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE; 152 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE;
153 virtual void InitializeExtensionsRequestContext(
154 ProfileParams* profile_params) const OVERRIDE;
145 virtual ChromeURLRequestContext* InitializeAppRequestContext( 155 virtual ChromeURLRequestContext* InitializeAppRequestContext(
146 ChromeURLRequestContext* main_context, 156 ChromeURLRequestContext* main_context,
147 const StoragePartitionDescriptor& partition_descriptor, 157 const StoragePartitionDescriptor& partition_descriptor,
148 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> 158 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory>
149 protocol_handler_interceptor, 159 protocol_handler_interceptor,
150 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE; 160 content::ProtocolHandlerMap* protocol_handlers) const OVERRIDE;
151 virtual ChromeURLRequestContext* InitializeMediaRequestContext( 161 virtual ChromeURLRequestContext* InitializeMediaRequestContext(
152 ChromeURLRequestContext* original_context, 162 ChromeURLRequestContext* original_context,
153 const StoragePartitionDescriptor& partition_descriptor) const OVERRIDE; 163 const StoragePartitionDescriptor& partition_descriptor) const OVERRIDE;
154 virtual ChromeURLRequestContext* 164 virtual ChromeURLRequestContext*
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 205
196 // Parameters needed for isolated apps. 206 // Parameters needed for isolated apps.
197 base::FilePath profile_path_; 207 base::FilePath profile_path_;
198 int app_cache_max_size_; 208 int app_cache_max_size_;
199 int app_media_cache_max_size_; 209 int app_media_cache_max_size_;
200 210
201 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); 211 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData);
202 }; 212 };
203 213
204 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ 214 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/profiles/profile_impl.cc ('k') | trunk/src/chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698