OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ | 5 #ifndef IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ |
6 #define IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ | 6 #define IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 return data_reduction_proxy_io_data_.get(); | 135 return data_reduction_proxy_io_data_.get(); |
136 } | 136 } |
137 | 137 |
138 protected: | 138 protected: |
139 // A URLRequestContext for apps that owns its cookie store and HTTP factory, | 139 // A URLRequestContext for apps that owns its cookie store and HTTP factory, |
140 // to ensure they are deleted. | 140 // to ensure they are deleted. |
141 class AppRequestContext : public net::URLRequestContext { | 141 class AppRequestContext : public net::URLRequestContext { |
142 public: | 142 public: |
143 AppRequestContext(); | 143 AppRequestContext(); |
144 | 144 |
145 void SetCookieStore(net::CookieStore* cookie_store); | 145 void SetCookieStore(scoped_ptr<net::CookieStore> cookie_store); |
146 void SetHttpTransactionFactory( | 146 void SetHttpTransactionFactory( |
147 scoped_ptr<net::HttpTransactionFactory> http_factory); | 147 scoped_ptr<net::HttpTransactionFactory> http_factory); |
148 void SetJobFactory(scoped_ptr<net::URLRequestJobFactory> job_factory); | 148 void SetJobFactory(scoped_ptr<net::URLRequestJobFactory> job_factory); |
149 | 149 |
150 private: | 150 private: |
151 ~AppRequestContext() override; | 151 ~AppRequestContext() override; |
152 | 152 |
153 scoped_refptr<net::CookieStore> cookie_store_; | 153 scoped_ptr<net::CookieStore> cookie_store_; |
154 scoped_ptr<net::HttpTransactionFactory> http_factory_; | 154 scoped_ptr<net::HttpTransactionFactory> http_factory_; |
155 scoped_ptr<net::URLRequestJobFactory> job_factory_; | 155 scoped_ptr<net::URLRequestJobFactory> job_factory_; |
156 }; | 156 }; |
157 | 157 |
158 // Created on the UI thread, read on the IO thread during | 158 // Created on the UI thread, read on the IO thread during |
159 // ChromeBrowserStateIOData lazy initialization. | 159 // ChromeBrowserStateIOData lazy initialization. |
160 struct ProfileParams { | 160 struct ProfileParams { |
161 ProfileParams(); | 161 ProfileParams(); |
162 ~ProfileParams(); | 162 ~ProfileParams(); |
163 | 163 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 | 319 |
320 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 320 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
321 bool initialized_on_UI_thread_; | 321 bool initialized_on_UI_thread_; |
322 | 322 |
323 const ios::ChromeBrowserStateType browser_state_type_; | 323 const ios::ChromeBrowserStateType browser_state_type_; |
324 | 324 |
325 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserStateIOData); | 325 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserStateIOData); |
326 }; | 326 }; |
327 | 327 |
328 #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ | 328 #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ |
OLD | NEW |