| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // thread, and should only be called from there. | 124 // thread, and should only be called from there. |
| 125 bool GetMetricsEnabledStateOnIOThread() const; | 125 bool GetMetricsEnabledStateOnIOThread() const; |
| 126 | 126 |
| 127 protected: | 127 protected: |
| 128 // A URLRequestContext for apps that owns its cookie store and HTTP factory, | 128 // A URLRequestContext for apps that owns its cookie store and HTTP factory, |
| 129 // to ensure they are deleted. | 129 // to ensure they are deleted. |
| 130 class AppRequestContext : public net::URLRequestContext { | 130 class AppRequestContext : public net::URLRequestContext { |
| 131 public: | 131 public: |
| 132 AppRequestContext(); | 132 AppRequestContext(); |
| 133 | 133 |
| 134 void SetCookieStore(net::CookieStore* cookie_store); | 134 void SetCookieStore(scoped_ptr<net::CookieStore> cookie_store); |
| 135 void SetHttpTransactionFactory( | 135 void SetHttpTransactionFactory( |
| 136 scoped_ptr<net::HttpTransactionFactory> http_factory); | 136 scoped_ptr<net::HttpTransactionFactory> http_factory); |
| 137 void SetJobFactory(scoped_ptr<net::URLRequestJobFactory> job_factory); | 137 void SetJobFactory(scoped_ptr<net::URLRequestJobFactory> job_factory); |
| 138 | 138 |
| 139 private: | 139 private: |
| 140 ~AppRequestContext() override; | 140 ~AppRequestContext() override; |
| 141 | 141 |
| 142 scoped_refptr<net::CookieStore> cookie_store_; | 142 scoped_ptr<net::CookieStore> cookie_store_; |
| 143 scoped_ptr<net::HttpTransactionFactory> http_factory_; | 143 scoped_ptr<net::HttpTransactionFactory> http_factory_; |
| 144 scoped_ptr<net::URLRequestJobFactory> job_factory_; | 144 scoped_ptr<net::URLRequestJobFactory> job_factory_; |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 // Created on the UI thread, read on the IO thread during | 147 // Created on the UI thread, read on the IO thread during |
| 148 // ChromeBrowserStateIOData lazy initialization. | 148 // ChromeBrowserStateIOData lazy initialization. |
| 149 struct ProfileParams { | 149 struct ProfileParams { |
| 150 ProfileParams(); | 150 ProfileParams(); |
| 151 ~ProfileParams(); | 151 ~ProfileParams(); |
| 152 | 152 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 | 301 |
| 302 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 302 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
| 303 bool initialized_on_UI_thread_; | 303 bool initialized_on_UI_thread_; |
| 304 | 304 |
| 305 const ios::ChromeBrowserStateType browser_state_type_; | 305 const ios::ChromeBrowserStateType browser_state_type_; |
| 306 | 306 |
| 307 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserStateIOData); | 307 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserStateIOData); |
| 308 }; | 308 }; |
| 309 | 309 |
| 310 #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ | 310 #endif // IOS_CHROME_BROWSER_BROWSER_STATE_CHROME_BROWSER_STATE_IO_DATA_H_ |
| OLD | NEW |