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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 GetMediaRequestContextGetter() const; | 64 GetMediaRequestContextGetter() const; |
65 scoped_refptr<ChromeURLRequestContextGetter> | 65 scoped_refptr<ChromeURLRequestContextGetter> |
66 GetExtensionsRequestContextGetter() const; | 66 GetExtensionsRequestContextGetter() const; |
67 scoped_refptr<ChromeURLRequestContextGetter> | 67 scoped_refptr<ChromeURLRequestContextGetter> |
68 GetIsolatedAppRequestContextGetter( | 68 GetIsolatedAppRequestContextGetter( |
69 const std::string& app_id) const; | 69 const std::string& app_id) const; |
70 scoped_refptr<ChromeURLRequestContextGetter> | 70 scoped_refptr<ChromeURLRequestContextGetter> |
71 GetIsolatedMediaRequestContextGetter( | 71 GetIsolatedMediaRequestContextGetter( |
72 const std::string& app_id) const; | 72 const std::string& app_id) const; |
73 | 73 |
74 void ClearNetworkingHistorySince(base::Time time); | 74 // Deletes all network related data since |time|. It deletes transport |
| 75 // security state since |time| and also deletes HttpServerProperties data. |
| 76 // Works asynchronously, however if the |completion| callback is non-null, |
| 77 // it will be posted on the UI thread once the removal process completes. |
| 78 void ClearNetworkingHistorySince(base::Time time, |
| 79 const base::Closure& completion); |
75 | 80 |
76 private: | 81 private: |
77 typedef base::hash_map<std::string, | 82 typedef base::hash_map<std::string, |
78 scoped_refptr<ChromeURLRequestContextGetter> > | 83 scoped_refptr<ChromeURLRequestContextGetter> > |
79 ChromeURLRequestContextGetterMap; | 84 ChromeURLRequestContextGetterMap; |
80 | 85 |
81 // Lazily initialize ProfileParams. We do this on the calls to | 86 // Lazily initialize ProfileParams. We do this on the calls to |
82 // Get*RequestContextGetter(), so we only initialize ProfileParams right | 87 // Get*RequestContextGetter(), so we only initialize ProfileParams right |
83 // before posting a task to the IO thread to start using them. This prevents | 88 // before posting a task to the IO thread to start using them. This prevents |
84 // objects that are supposed to be deleted on the IO thread, but are created | 89 // objects that are supposed to be deleted on the IO thread, but are created |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 virtual chrome_browser_net::LoadTimeStats* GetLoadTimeStats( | 165 virtual chrome_browser_net::LoadTimeStats* GetLoadTimeStats( |
161 IOThread::Globals* io_thread_globals) const OVERRIDE; | 166 IOThread::Globals* io_thread_globals) const OVERRIDE; |
162 | 167 |
163 void SetUpJobFactory(net::URLRequestJobFactory* job_factory, | 168 void SetUpJobFactory(net::URLRequestJobFactory* job_factory, |
164 scoped_ptr<net::URLRequestJobFactory::Interceptor> | 169 scoped_ptr<net::URLRequestJobFactory::Interceptor> |
165 protocol_handler_interceptor, | 170 protocol_handler_interceptor, |
166 net::NetworkDelegate* network_delegate, | 171 net::NetworkDelegate* network_delegate, |
167 net::FtpTransactionFactory* ftp_transaction_factory, | 172 net::FtpTransactionFactory* ftp_transaction_factory, |
168 net::FtpAuthCache* ftp_auth_cache) const; | 173 net::FtpAuthCache* ftp_auth_cache) const; |
169 | 174 |
170 // Clears the networking history since |time|. | 175 // Deletes all network related data since |time|. It deletes transport |
171 void ClearNetworkingHistorySinceOnIOThread(base::Time time); | 176 // security state since |time| and also deletes HttpServerProperties data. |
| 177 // Works asynchronously, however if the |completion| callback is non-null, |
| 178 // it will be posted on the UI thread once the removal process completes. |
| 179 void ClearNetworkingHistorySinceOnIOThread(base::Time time, |
| 180 const base::Closure& completion); |
172 | 181 |
173 // Lazy initialization params. | 182 // Lazy initialization params. |
174 mutable scoped_ptr<LazyParams> lazy_params_; | 183 mutable scoped_ptr<LazyParams> lazy_params_; |
175 | 184 |
176 mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_; | 185 mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_; |
177 mutable scoped_ptr<net::FtpTransactionFactory> ftp_factory_; | 186 mutable scoped_ptr<net::FtpTransactionFactory> ftp_factory_; |
178 | 187 |
179 mutable scoped_ptr<chrome_browser_net::Predictor> predictor_; | 188 mutable scoped_ptr<chrome_browser_net::Predictor> predictor_; |
180 | 189 |
181 mutable scoped_ptr<ChromeURLRequestContext> media_request_context_; | 190 mutable scoped_ptr<ChromeURLRequestContext> media_request_context_; |
182 | 191 |
183 mutable scoped_ptr<net::URLRequestJobFactory> main_job_factory_; | 192 mutable scoped_ptr<net::URLRequestJobFactory> main_job_factory_; |
184 mutable scoped_ptr<net::URLRequestJobFactory> extensions_job_factory_; | 193 mutable scoped_ptr<net::URLRequestJobFactory> extensions_job_factory_; |
185 | 194 |
186 // Parameters needed for isolated apps. | 195 // Parameters needed for isolated apps. |
187 FilePath profile_path_; | 196 FilePath profile_path_; |
188 int app_cache_max_size_; | 197 int app_cache_max_size_; |
189 int app_media_cache_max_size_; | 198 int app_media_cache_max_size_; |
190 | 199 |
191 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 200 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
192 }; | 201 }; |
193 | 202 |
194 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 203 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
OLD | NEW |