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/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 12 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
13 #include "chrome/browser/profiles/profile_io_data.h" | 13 #include "chrome/browser/profiles/profile_io_data.h" |
| 14 #include "components/domain_reliability/clear_mode.h" |
14 #include "content/public/browser/cookie_store_factory.h" | 15 #include "content/public/browser/cookie_store_factory.h" |
15 | 16 |
16 namespace chrome_browser_net { | 17 namespace chrome_browser_net { |
17 class HttpServerPropertiesManager; | 18 class HttpServerPropertiesManager; |
18 class Predictor; | 19 class Predictor; |
19 } // namespace chrome_browser_net | 20 } // namespace chrome_browser_net |
20 | 21 |
21 namespace content { | 22 namespace content { |
22 class CookieCryptoDelegate; | 23 class CookieCryptoDelegate; |
23 } // namespace content | 24 } // namespace content |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 const base::FilePath& partition_path, | 89 const base::FilePath& partition_path, |
89 bool in_memory) const; | 90 bool in_memory) const; |
90 | 91 |
91 // Deletes all network related data since |time|. It deletes transport | 92 // Deletes all network related data since |time|. It deletes transport |
92 // security state since |time| and also deletes HttpServerProperties data. | 93 // security state since |time| and also deletes HttpServerProperties data. |
93 // Works asynchronously, however if the |completion| callback is non-null, | 94 // Works asynchronously, however if the |completion| callback is non-null, |
94 // it will be posted on the UI thread once the removal process completes. | 95 // it will be posted on the UI thread once the removal process completes. |
95 void ClearNetworkingHistorySince(base::Time time, | 96 void ClearNetworkingHistorySince(base::Time time, |
96 const base::Closure& completion); | 97 const base::Closure& completion); |
97 | 98 |
| 99 // Clears part or all of the state of the Domain Reliability Monitor. If |
| 100 // |clear_contexts| is true, clears the (site-provided) contexts, which are |
| 101 // cookie-esque; if it is false, clears only the (logged) beacons within |
| 102 // them, which are history-esque. |
| 103 void ClearDomainReliabilityMonitor( |
| 104 domain_reliability::DomainReliabilityClearMode mode, |
| 105 const base::Closure& completion); |
| 106 |
98 private: | 107 private: |
99 typedef std::map<StoragePartitionDescriptor, | 108 typedef std::map<StoragePartitionDescriptor, |
100 scoped_refptr<ChromeURLRequestContextGetter>, | 109 scoped_refptr<ChromeURLRequestContextGetter>, |
101 StoragePartitionDescriptorLess> | 110 StoragePartitionDescriptorLess> |
102 ChromeURLRequestContextGetterMap; | 111 ChromeURLRequestContextGetterMap; |
103 | 112 |
104 // Lazily initialize ProfileParams. We do this on the calls to | 113 // Lazily initialize ProfileParams. We do this on the calls to |
105 // Get*RequestContextGetter(), so we only initialize ProfileParams right | 114 // Get*RequestContextGetter(), so we only initialize ProfileParams right |
106 // before posting a task to the IO thread to start using them. This prevents | 115 // before posting a task to the IO thread to start using them. This prevents |
107 // objects that are supposed to be deleted on the IO thread, but are created | 116 // objects that are supposed to be deleted on the IO thread, but are created |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 const StoragePartitionDescriptor& partition_descriptor) | 198 const StoragePartitionDescriptor& partition_descriptor) |
190 const OVERRIDE; | 199 const OVERRIDE; |
191 | 200 |
192 // Deletes all network related data since |time|. It deletes transport | 201 // Deletes all network related data since |time|. It deletes transport |
193 // security state since |time| and also deletes HttpServerProperties data. | 202 // security state since |time| and also deletes HttpServerProperties data. |
194 // Works asynchronously, however if the |completion| callback is non-null, | 203 // Works asynchronously, however if the |completion| callback is non-null, |
195 // it will be posted on the UI thread once the removal process completes. | 204 // it will be posted on the UI thread once the removal process completes. |
196 void ClearNetworkingHistorySinceOnIOThread(base::Time time, | 205 void ClearNetworkingHistorySinceOnIOThread(base::Time time, |
197 const base::Closure& completion); | 206 const base::Closure& completion); |
198 | 207 |
| 208 void ClearDomainReliabilityMonitorOnIOThread( |
| 209 domain_reliability::DomainReliabilityClearMode mode, |
| 210 const base::Closure& completion); |
| 211 |
199 // Lazy initialization params. | 212 // Lazy initialization params. |
200 mutable scoped_ptr<LazyParams> lazy_params_; | 213 mutable scoped_ptr<LazyParams> lazy_params_; |
201 | 214 |
202 mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_; | 215 mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_; |
203 mutable scoped_ptr<net::FtpTransactionFactory> ftp_factory_; | 216 mutable scoped_ptr<net::FtpTransactionFactory> ftp_factory_; |
204 | 217 |
205 // Same as |ProfileIOData::http_server_properties_|, owned there to maintain | 218 // Same as |ProfileIOData::http_server_properties_|, owned there to maintain |
206 // destruction ordering. | 219 // destruction ordering. |
207 mutable chrome_browser_net::HttpServerPropertiesManager* | 220 mutable chrome_browser_net::HttpServerPropertiesManager* |
208 http_server_properties_manager_; | 221 http_server_properties_manager_; |
(...skipping 10 matching lines...) Expand all Loading... |
219 | 232 |
220 // Parameters needed for isolated apps. | 233 // Parameters needed for isolated apps. |
221 base::FilePath profile_path_; | 234 base::FilePath profile_path_; |
222 int app_cache_max_size_; | 235 int app_cache_max_size_; |
223 int app_media_cache_max_size_; | 236 int app_media_cache_max_size_; |
224 | 237 |
225 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 238 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
226 }; | 239 }; |
227 | 240 |
228 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 241 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
OLD | NEW |