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 void ClearNetworkingHistorySince(base::Time time, |
75 const base::Closure& completion); | |
mmenke
2012/10/25 20:15:52
Think you should mention that |completion| will be
engedy
2012/10/25 21:47:43
I agree. I copied the comment from profile.h and a
| |
75 | 76 |
76 private: | 77 private: |
77 typedef base::hash_map<std::string, | 78 typedef base::hash_map<std::string, |
78 scoped_refptr<ChromeURLRequestContextGetter> > | 79 scoped_refptr<ChromeURLRequestContextGetter> > |
79 ChromeURLRequestContextGetterMap; | 80 ChromeURLRequestContextGetterMap; |
80 | 81 |
81 // Lazily initialize ProfileParams. We do this on the calls to | 82 // Lazily initialize ProfileParams. We do this on the calls to |
82 // Get*RequestContextGetter(), so we only initialize ProfileParams right | 83 // Get*RequestContextGetter(), so we only initialize ProfileParams right |
83 // before posting a task to the IO thread to start using them. This prevents | 84 // 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 | 85 // objects that are supposed to be deleted on the IO thread, but are created |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
161 IOThread::Globals* io_thread_globals) const OVERRIDE; | 162 IOThread::Globals* io_thread_globals) const OVERRIDE; |
162 | 163 |
163 void SetUpJobFactory(net::URLRequestJobFactory* job_factory, | 164 void SetUpJobFactory(net::URLRequestJobFactory* job_factory, |
164 scoped_ptr<net::URLRequestJobFactory::Interceptor> | 165 scoped_ptr<net::URLRequestJobFactory::Interceptor> |
165 protocol_handler_interceptor, | 166 protocol_handler_interceptor, |
166 net::NetworkDelegate* network_delegate, | 167 net::NetworkDelegate* network_delegate, |
167 net::FtpTransactionFactory* ftp_transaction_factory, | 168 net::FtpTransactionFactory* ftp_transaction_factory, |
168 net::FtpAuthCache* ftp_auth_cache) const; | 169 net::FtpAuthCache* ftp_auth_cache) const; |
169 | 170 |
170 // Clears the networking history since |time|. | 171 // Clears the networking history since |time|. |
171 void ClearNetworkingHistorySinceOnIOThread(base::Time time); | 172 void ClearNetworkingHistorySinceOnIOThread(base::Time time, |
173 const base::Closure& completion); | |
172 | 174 |
173 // Lazy initialization params. | 175 // Lazy initialization params. |
174 mutable scoped_ptr<LazyParams> lazy_params_; | 176 mutable scoped_ptr<LazyParams> lazy_params_; |
175 | 177 |
176 mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_; | 178 mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_; |
177 mutable scoped_ptr<net::FtpTransactionFactory> ftp_factory_; | 179 mutable scoped_ptr<net::FtpTransactionFactory> ftp_factory_; |
178 | 180 |
179 mutable scoped_ptr<chrome_browser_net::Predictor> predictor_; | 181 mutable scoped_ptr<chrome_browser_net::Predictor> predictor_; |
180 | 182 |
181 mutable scoped_ptr<ChromeURLRequestContext> media_request_context_; | 183 mutable scoped_ptr<ChromeURLRequestContext> media_request_context_; |
182 | 184 |
183 mutable scoped_ptr<net::URLRequestJobFactory> main_job_factory_; | 185 mutable scoped_ptr<net::URLRequestJobFactory> main_job_factory_; |
184 mutable scoped_ptr<net::URLRequestJobFactory> extensions_job_factory_; | 186 mutable scoped_ptr<net::URLRequestJobFactory> extensions_job_factory_; |
185 | 187 |
186 // Parameters needed for isolated apps. | 188 // Parameters needed for isolated apps. |
187 FilePath profile_path_; | 189 FilePath profile_path_; |
188 int app_cache_max_size_; | 190 int app_cache_max_size_; |
189 int app_media_cache_max_size_; | 191 int app_media_cache_max_size_; |
190 | 192 |
191 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 193 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
192 }; | 194 }; |
193 | 195 |
194 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 196 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
OLD | NEW |