| 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_IO_DATA_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 } | 100 } |
| 101 | 101 |
| 102 ChromeURLRequestContext* extensions_request_context() const { | 102 ChromeURLRequestContext* extensions_request_context() const { |
| 103 return extensions_request_context_.get(); | 103 return extensions_request_context_.get(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 BooleanPrefMember* safe_browsing_enabled() const { | 106 BooleanPrefMember* safe_browsing_enabled() const { |
| 107 return &safe_browsing_enabled_; | 107 return &safe_browsing_enabled_; |
| 108 } | 108 } |
| 109 | 109 |
| 110 BooleanPrefMember* enable_metrics() const { |
| 111 return &enable_metrics_; |
| 112 } |
| 113 |
| 110 net::TransportSecurityState* transport_security_state() const { | 114 net::TransportSecurityState* transport_security_state() const { |
| 111 return transport_security_state_.get(); | 115 return transport_security_state_.get(); |
| 112 } | 116 } |
| 113 | 117 |
| 114 chrome_browser_net::HttpServerPropertiesManager* | 118 chrome_browser_net::HttpServerPropertiesManager* |
| 115 http_server_properties_manager() const; | 119 http_server_properties_manager() const; |
| 116 | 120 |
| 121 bool is_incognito() const { |
| 122 return is_incognito_; |
| 123 } |
| 124 |
| 117 protected: | 125 protected: |
| 118 class AppRequestContext : public ChromeURLRequestContext { | 126 class AppRequestContext : public ChromeURLRequestContext { |
| 119 public: | 127 public: |
| 120 AppRequestContext(); | 128 AppRequestContext(); |
| 121 | 129 |
| 122 void SetCookieStore(net::CookieStore* cookie_store); | 130 void SetCookieStore(net::CookieStore* cookie_store); |
| 123 void SetHttpTransactionFactory(net::HttpTransactionFactory* http_factory); | 131 void SetHttpTransactionFactory(net::HttpTransactionFactory* http_factory); |
| 124 | 132 |
| 125 private: | 133 private: |
| 126 virtual ~AppRequestContext(); | 134 virtual ~AppRequestContext(); |
| 127 | 135 |
| 128 scoped_refptr<net::CookieStore> cookie_store_; | 136 scoped_refptr<net::CookieStore> cookie_store_; |
| 129 scoped_ptr<net::HttpTransactionFactory> http_factory_; | 137 scoped_ptr<net::HttpTransactionFactory> http_factory_; |
| 130 }; | 138 }; |
| 131 | 139 |
| 132 // Created on the UI thread, read on the IO thread during ProfileIOData lazy | 140 // Created on the UI thread, read on the IO thread during ProfileIOData lazy |
| 133 // initialization. | 141 // initialization. |
| 134 struct ProfileParams { | 142 struct ProfileParams { |
| 135 ProfileParams(); | 143 ProfileParams(); |
| 136 ~ProfileParams(); | 144 ~ProfileParams(); |
| 137 | 145 |
| 138 FilePath path; | 146 FilePath path; |
| 139 bool is_incognito; | |
| 140 bool clear_local_state_on_exit; | 147 bool clear_local_state_on_exit; |
| 141 std::string accept_language; | 148 std::string accept_language; |
| 142 std::string accept_charset; | 149 std::string accept_charset; |
| 143 std::string referrer_charset; | 150 std::string referrer_charset; |
| 144 IOThread* io_thread; | 151 IOThread* io_thread; |
| 145 scoped_refptr<CookieSettings> cookie_settings; | 152 scoped_refptr<CookieSettings> cookie_settings; |
| 146 scoped_refptr<net::SSLConfigService> ssl_config_service; | 153 scoped_refptr<net::SSLConfigService> ssl_config_service; |
| 147 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; | 154 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; |
| 148 scoped_refptr<ExtensionInfoMap> extension_info_map; | 155 scoped_refptr<ExtensionInfoMap> extension_info_map; |
| 149 | 156 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 290 |
| 284 // Tracks whether or not we've been lazily initialized. | 291 // Tracks whether or not we've been lazily initialized. |
| 285 mutable bool initialized_; | 292 mutable bool initialized_; |
| 286 | 293 |
| 287 // Data from the UI thread from the Profile, used to initialize ProfileIOData. | 294 // Data from the UI thread from the Profile, used to initialize ProfileIOData. |
| 288 // Deleted after lazy initialization. | 295 // Deleted after lazy initialization. |
| 289 mutable scoped_ptr<ProfileParams> profile_params_; | 296 mutable scoped_ptr<ProfileParams> profile_params_; |
| 290 | 297 |
| 291 // Member variables which are pointed to by the various context objects. | 298 // Member variables which are pointed to by the various context objects. |
| 292 mutable BooleanPrefMember enable_referrers_; | 299 mutable BooleanPrefMember enable_referrers_; |
| 300 mutable BooleanPrefMember enable_metrics_; |
| 293 mutable BooleanPrefMember clear_local_state_on_exit_; | 301 mutable BooleanPrefMember clear_local_state_on_exit_; |
| 294 mutable BooleanPrefMember safe_browsing_enabled_; | 302 mutable BooleanPrefMember safe_browsing_enabled_; |
| 295 // TODO(marja): Remove session_startup_pref_ if no longer needed. | 303 // TODO(marja): Remove session_startup_pref_ if no longer needed. |
| 296 mutable IntegerPrefMember session_startup_pref_; | 304 mutable IntegerPrefMember session_startup_pref_; |
| 297 | 305 |
| 298 // Pointed to by NetworkDelegate. | 306 // Pointed to by NetworkDelegate. |
| 299 mutable scoped_ptr<policy::URLBlacklistManager> url_blacklist_manager_; | 307 mutable scoped_ptr<policy::URLBlacklistManager> url_blacklist_manager_; |
| 300 | 308 |
| 301 // Pointed to by URLRequestContext. | 309 // Pointed to by URLRequestContext. |
| 302 mutable scoped_ptr<ChromeURLDataManagerBackend> | 310 mutable scoped_ptr<ChromeURLDataManagerBackend> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 326 mutable AppRequestContextMap app_request_context_map_; | 334 mutable AppRequestContextMap app_request_context_map_; |
| 327 | 335 |
| 328 mutable scoped_ptr<ResourceContext> resource_context_; | 336 mutable scoped_ptr<ResourceContext> resource_context_; |
| 329 | 337 |
| 330 mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; | 338 mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; |
| 331 mutable scoped_refptr<CookieSettings> cookie_settings_; | 339 mutable scoped_refptr<CookieSettings> cookie_settings_; |
| 332 | 340 |
| 333 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 341 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
| 334 bool initialized_on_UI_thread_; | 342 bool initialized_on_UI_thread_; |
| 335 | 343 |
| 344 bool is_incognito_; |
| 345 |
| 336 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 346 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 337 }; | 347 }; |
| 338 | 348 |
| 339 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 349 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |