OLD | NEW |
---|---|
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/hash_tables.h" | 10 #include "base/hash_tables.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 | 55 |
56 base::Callback<ChromeURLDataManagerBackend*(void)> | 56 base::Callback<ChromeURLDataManagerBackend*(void)> |
57 GetChromeURLDataManagerBackendGetter() const; | 57 GetChromeURLDataManagerBackendGetter() const; |
58 content::ResourceContext* GetResourceContext() const; | 58 content::ResourceContext* GetResourceContext() const; |
59 // GetResourceContextNoInit() does not call LazyInitialize() so it can be | 59 // GetResourceContextNoInit() does not call LazyInitialize() so it can be |
60 // safely be used during initialization. | 60 // safely be used during initialization. |
61 content::ResourceContext* GetResourceContextNoInit() const; | 61 content::ResourceContext* GetResourceContextNoInit() const; |
62 scoped_refptr<ChromeURLRequestContextGetter> | 62 scoped_refptr<ChromeURLRequestContextGetter> |
63 GetMainRequestContextGetter() const; | 63 GetMainRequestContextGetter() const; |
64 scoped_refptr<ChromeURLRequestContextGetter> | 64 scoped_refptr<ChromeURLRequestContextGetter> |
65 CreateMainRequestContextGetter( | |
66 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
67 blob_protocol_handler, | |
68 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
69 file_system_protocol_handler, | |
70 scoped_ptr<net::URLRequestJobFactory::Interceptor> | |
71 developer_protocol_handler) const; | |
72 scoped_refptr<ChromeURLRequestContextGetter> | |
65 GetMediaRequestContextGetter() const; | 73 GetMediaRequestContextGetter() const; |
66 scoped_refptr<ChromeURLRequestContextGetter> | 74 scoped_refptr<ChromeURLRequestContextGetter> |
67 GetExtensionsRequestContextGetter() const; | 75 GetExtensionsRequestContextGetter() const; |
68 scoped_refptr<ChromeURLRequestContextGetter> | 76 scoped_refptr<ChromeURLRequestContextGetter> |
69 GetIsolatedAppRequestContextGetter( | 77 CreateIsolatedAppRequestContextGetter( |
70 const FilePath& partition_path, | 78 const FilePath& partition_path, |
71 bool in_memory) const; | 79 bool in_memory, |
80 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
81 blob_protocol_handler, | |
82 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
83 file_system_protocol_handler, | |
84 scoped_ptr<net::URLRequestJobFactory::Interceptor> | |
85 developer_protocol_handler) const; | |
72 scoped_refptr<ChromeURLRequestContextGetter> | 86 scoped_refptr<ChromeURLRequestContextGetter> |
73 GetIsolatedMediaRequestContextGetter( | 87 GetIsolatedMediaRequestContextGetter( |
74 const FilePath& partition_path, | 88 const FilePath& partition_path, |
75 bool in_memory) const; | 89 bool in_memory) const; |
76 | 90 |
77 // Deletes all network related data since |time|. It deletes transport | 91 // Deletes all network related data since |time|. It deletes transport |
78 // security state since |time| and also deletes HttpServerProperties data. | 92 // security state since |time| and also deletes HttpServerProperties data. |
79 // Works asynchronously, however if the |completion| callback is non-null, | 93 // Works asynchronously, however if the |completion| callback is non-null, |
80 // it will be posted on the UI thread once the removal process completes. | 94 // it will be posted on the UI thread once the removal process completes. |
81 void ClearNetworkingHistorySince(base::Time time, | 95 void ClearNetworkingHistorySince(base::Time time, |
(...skipping 23 matching lines...) Expand all Loading... | |
105 mutable scoped_refptr<ChromeURLRequestContextGetter> | 119 mutable scoped_refptr<ChromeURLRequestContextGetter> |
106 media_request_context_getter_; | 120 media_request_context_getter_; |
107 mutable scoped_refptr<ChromeURLRequestContextGetter> | 121 mutable scoped_refptr<ChromeURLRequestContextGetter> |
108 extensions_request_context_getter_; | 122 extensions_request_context_getter_; |
109 mutable ChromeURLRequestContextGetterMap app_request_context_getter_map_; | 123 mutable ChromeURLRequestContextGetterMap app_request_context_getter_map_; |
110 mutable ChromeURLRequestContextGetterMap | 124 mutable ChromeURLRequestContextGetterMap |
111 isolated_media_request_context_getter_map_; | 125 isolated_media_request_context_getter_map_; |
112 ProfileImplIOData* const io_data_; | 126 ProfileImplIOData* const io_data_; |
113 | 127 |
114 Profile* const profile_; | 128 Profile* const profile_; |
129 PrefService* local_state_; | |
awong
2012/12/12 03:44:37
What's our guarantee on the lifetime of local_stat
pauljensen
2012/12/12 18:39:37
I removed these and just made them arguments of Cr
| |
130 IOThread* io_thread_; | |
115 | 131 |
116 mutable bool initialized_; | 132 mutable bool initialized_; |
117 | 133 |
118 DISALLOW_COPY_AND_ASSIGN(Handle); | 134 DISALLOW_COPY_AND_ASSIGN(Handle); |
119 }; | 135 }; |
120 | 136 |
121 private: | 137 private: |
122 friend class base::RefCountedThreadSafe<ProfileImplIOData>; | 138 friend class base::RefCountedThreadSafe<ProfileImplIOData>; |
123 | 139 |
124 struct LazyParams { | 140 struct LazyParams { |
(...skipping 13 matching lines...) Expand all Loading... | |
138 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy; | 154 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy; |
139 }; | 155 }; |
140 | 156 |
141 typedef base::hash_map<std::string, net::HttpTransactionFactory* > | 157 typedef base::hash_map<std::string, net::HttpTransactionFactory* > |
142 HttpTransactionFactoryMap; | 158 HttpTransactionFactoryMap; |
143 | 159 |
144 ProfileImplIOData(); | 160 ProfileImplIOData(); |
145 virtual ~ProfileImplIOData(); | 161 virtual ~ProfileImplIOData(); |
146 | 162 |
147 virtual void LazyInitializeInternal( | 163 virtual void LazyInitializeInternal( |
148 ProfileParams* profile_params) const OVERRIDE; | 164 ProfileParams* profile_params, |
165 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
166 blob_protocol_handler, | |
167 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
168 file_system_protocol_handler, | |
169 scoped_ptr<net::URLRequestJobFactory::Interceptor> | |
170 developer_protocol_handler) const OVERRIDE; | |
149 virtual void InitializeExtensionsRequestContext( | 171 virtual void InitializeExtensionsRequestContext( |
150 ProfileParams* profile_params) const OVERRIDE; | 172 ProfileParams* profile_params) const OVERRIDE; |
151 virtual ChromeURLRequestContext* InitializeAppRequestContext( | 173 virtual ChromeURLRequestContext* InitializeAppRequestContext( |
152 ChromeURLRequestContext* main_context, | 174 ChromeURLRequestContext* main_context, |
153 const StoragePartitionDescriptor& partition_descriptor, | 175 const StoragePartitionDescriptor& partition_descriptor, |
154 scoped_ptr<net::URLRequestJobFactory::Interceptor> | 176 scoped_ptr<net::URLRequestJobFactory::Interceptor> |
155 protocol_handler_interceptor) const OVERRIDE; | 177 protocol_handler_interceptor, |
178 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
179 blob_protocol_handler, | |
180 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
181 file_system_protocol_handler, | |
182 scoped_ptr<net::URLRequestJobFactory::Interceptor> | |
183 developer_protocol_handler) const OVERRIDE; | |
156 virtual ChromeURLRequestContext* InitializeMediaRequestContext( | 184 virtual ChromeURLRequestContext* InitializeMediaRequestContext( |
157 ChromeURLRequestContext* original_context, | 185 ChromeURLRequestContext* original_context, |
158 const StoragePartitionDescriptor& partition_descriptor) const OVERRIDE; | 186 const StoragePartitionDescriptor& partition_descriptor) const OVERRIDE; |
159 virtual ChromeURLRequestContext* | 187 virtual ChromeURLRequestContext* |
160 AcquireMediaRequestContext() const OVERRIDE; | 188 AcquireMediaRequestContext() const OVERRIDE; |
161 virtual ChromeURLRequestContext* | 189 virtual ChromeURLRequestContext* |
162 AcquireIsolatedAppRequestContext( | 190 AcquireIsolatedAppRequestContext( |
163 ChromeURLRequestContext* main_context, | 191 ChromeURLRequestContext* main_context, |
164 const StoragePartitionDescriptor& partition_descriptor, | 192 const StoragePartitionDescriptor& partition_descriptor, |
165 scoped_ptr<net::URLRequestJobFactory::Interceptor> | 193 scoped_ptr<net::URLRequestJobFactory::Interceptor> |
166 protocol_handler_interceptor) const OVERRIDE; | 194 protocol_handler_interceptor, |
195 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
196 blob_protocol_handler, | |
197 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
198 file_system_protocol_handler, | |
199 scoped_ptr<net::URLRequestJobFactory::Interceptor> | |
200 developer_protocol_handler) const OVERRIDE; | |
167 virtual ChromeURLRequestContext* | 201 virtual ChromeURLRequestContext* |
168 AcquireIsolatedMediaRequestContext( | 202 AcquireIsolatedMediaRequestContext( |
169 ChromeURLRequestContext* app_context, | 203 ChromeURLRequestContext* app_context, |
170 const StoragePartitionDescriptor& partition_descriptor) | 204 const StoragePartitionDescriptor& partition_descriptor) |
171 const OVERRIDE; | 205 const OVERRIDE; |
172 virtual chrome_browser_net::LoadTimeStats* GetLoadTimeStats( | 206 virtual chrome_browser_net::LoadTimeStats* GetLoadTimeStats( |
173 IOThread::Globals* io_thread_globals) const OVERRIDE; | 207 IOThread::Globals* io_thread_globals) const OVERRIDE; |
174 | 208 |
175 void SetUpJobFactory(net::URLRequestJobFactoryImpl* job_factory, | 209 void SetUpJobFactory(net::URLRequestJobFactoryImpl* job_factory, |
176 scoped_ptr<net::URLRequestJobFactory::Interceptor> | 210 scoped_ptr<net::URLRequestJobFactory::Interceptor> |
(...skipping 29 matching lines...) Expand all Loading... | |
206 | 240 |
207 // Parameters needed for isolated apps. | 241 // Parameters needed for isolated apps. |
208 FilePath profile_path_; | 242 FilePath profile_path_; |
209 int app_cache_max_size_; | 243 int app_cache_max_size_; |
210 int app_media_cache_max_size_; | 244 int app_media_cache_max_size_; |
211 | 245 |
212 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 246 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
213 }; | 247 }; |
214 | 248 |
215 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 249 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
OLD | NEW |