OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/hash_tables.h" | 11 #include "base/hash_tables.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "chrome/browser/profiles/profile_io_data.h" | 13 #include "chrome/browser/profiles/profile_io_data.h" |
14 | 14 |
15 namespace chrome_browser_net { | 15 namespace chrome_browser_net { |
| 16 class HttpServerPropertiesManager; |
16 class Predictor; | 17 class Predictor; |
17 } | 18 } |
18 | 19 |
19 namespace net { | 20 namespace net { |
| 21 class HttpServerProperties; |
20 class HttpTransactionFactory; | 22 class HttpTransactionFactory; |
21 } // namespace net | 23 } // namespace net |
22 | 24 |
23 class ProfileImplIOData : public ProfileIOData { | 25 class ProfileImplIOData : public ProfileIOData { |
24 public: | 26 public: |
25 class Handle { | 27 class Handle { |
26 public: | 28 public: |
27 explicit Handle(Profile* profile); | 29 explicit Handle(Profile* profile); |
28 ~Handle(); | 30 ~Handle(); |
29 | 31 |
(...skipping 21 matching lines...) Expand all Loading... |
51 scoped_refptr<ChromeURLRequestContextGetter> | 53 scoped_refptr<ChromeURLRequestContextGetter> |
52 GetMainRequestContextGetter() const; | 54 GetMainRequestContextGetter() const; |
53 scoped_refptr<ChromeURLRequestContextGetter> | 55 scoped_refptr<ChromeURLRequestContextGetter> |
54 GetMediaRequestContextGetter() const; | 56 GetMediaRequestContextGetter() const; |
55 scoped_refptr<ChromeURLRequestContextGetter> | 57 scoped_refptr<ChromeURLRequestContextGetter> |
56 GetExtensionsRequestContextGetter() const; | 58 GetExtensionsRequestContextGetter() const; |
57 scoped_refptr<ChromeURLRequestContextGetter> | 59 scoped_refptr<ChromeURLRequestContextGetter> |
58 GetIsolatedAppRequestContextGetter( | 60 GetIsolatedAppRequestContextGetter( |
59 const std::string& app_id) const; | 61 const std::string& app_id) const; |
60 | 62 |
61 void DeleteTransportSecurityStateSince(base::Time time); | 63 void ClearNetworkingHistorySince(base::Time time); |
62 | 64 |
63 private: | 65 private: |
64 typedef base::hash_map<std::string, | 66 typedef base::hash_map<std::string, |
65 scoped_refptr<ChromeURLRequestContextGetter> > | 67 scoped_refptr<ChromeURLRequestContextGetter> > |
66 ChromeURLRequestContextGetterMap; | 68 ChromeURLRequestContextGetterMap; |
67 | 69 |
68 // Lazily initialize ProfileParams. We do this on the calls to | 70 // Lazily initialize ProfileParams. We do this on the calls to |
69 // Get*RequestContextGetter(), so we only initialize ProfileParams right | 71 // Get*RequestContextGetter(), so we only initialize ProfileParams right |
70 // before posting a task to the IO thread to start using them. This prevents | 72 // before posting a task to the IO thread to start using them. This prevents |
71 // objects that are supposed to be deleted on the IO thread, but are created | 73 // objects that are supposed to be deleted on the IO thread, but are created |
(...skipping 15 matching lines...) Expand all Loading... |
87 mutable ChromeURLRequestContextGetterMap app_request_context_getter_map_; | 89 mutable ChromeURLRequestContextGetterMap app_request_context_getter_map_; |
88 ProfileImplIOData* const io_data_; | 90 ProfileImplIOData* const io_data_; |
89 | 91 |
90 Profile* const profile_; | 92 Profile* const profile_; |
91 | 93 |
92 mutable bool initialized_; | 94 mutable bool initialized_; |
93 | 95 |
94 DISALLOW_COPY_AND_ASSIGN(Handle); | 96 DISALLOW_COPY_AND_ASSIGN(Handle); |
95 }; | 97 }; |
96 | 98 |
| 99 net::HttpServerProperties* http_server_properties() const; |
| 100 |
97 private: | 101 private: |
98 friend class base::RefCountedThreadSafe<ProfileImplIOData>; | 102 friend class base::RefCountedThreadSafe<ProfileImplIOData>; |
99 | 103 |
100 struct LazyParams { | 104 struct LazyParams { |
101 LazyParams(); | 105 LazyParams(); |
102 ~LazyParams(); | 106 ~LazyParams(); |
103 | 107 |
104 // All of these parameters are intended to be read on the IO thread. | 108 // All of these parameters are intended to be read on the IO thread. |
105 FilePath cookie_path; | 109 FilePath cookie_path; |
106 FilePath origin_bound_cert_path; | 110 FilePath origin_bound_cert_path; |
(...skipping 23 matching lines...) Expand all Loading... |
130 | 134 |
131 // Lazy initialization params. | 135 // Lazy initialization params. |
132 mutable scoped_ptr<LazyParams> lazy_params_; | 136 mutable scoped_ptr<LazyParams> lazy_params_; |
133 | 137 |
134 mutable scoped_refptr<ChromeURLRequestContext> media_request_context_; | 138 mutable scoped_refptr<ChromeURLRequestContext> media_request_context_; |
135 | 139 |
136 mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_; | 140 mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_; |
137 mutable scoped_ptr<net::HttpTransactionFactory> media_http_factory_; | 141 mutable scoped_ptr<net::HttpTransactionFactory> media_http_factory_; |
138 | 142 |
139 mutable scoped_ptr<chrome_browser_net::Predictor> predictor_; | 143 mutable scoped_ptr<chrome_browser_net::Predictor> predictor_; |
| 144 mutable scoped_ptr<chrome_browser_net::HttpServerPropertiesManager> |
| 145 http_server_properties_manager_; |
140 | 146 |
141 // Parameters needed for isolated apps. | 147 // Parameters needed for isolated apps. |
142 FilePath app_path_; | 148 FilePath app_path_; |
143 mutable bool clear_local_state_on_exit_; | 149 mutable bool clear_local_state_on_exit_; |
144 | 150 |
145 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 151 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
146 }; | 152 }; |
147 | 153 |
148 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 154 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
OLD | NEW |