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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // These are useful when the Chrome layer is called from the content layer | 84 // These are useful when the Chrome layer is called from the content layer |
85 // with a content::ResourceContext, and they want access to Chrome data for | 85 // with a content::ResourceContext, and they want access to Chrome data for |
86 // that profile. | 86 // that profile. |
87 ExtensionInfoMap* GetExtensionInfoMap() const; | 87 ExtensionInfoMap* GetExtensionInfoMap() const; |
88 CookieSettings* GetCookieSettings() const; | 88 CookieSettings* GetCookieSettings() const; |
89 | 89 |
90 #if defined(ENABLE_NOTIFICATIONS) | 90 #if defined(ENABLE_NOTIFICATIONS) |
91 DesktopNotificationService* GetNotificationService() const; | 91 DesktopNotificationService* GetNotificationService() const; |
92 #endif | 92 #endif |
93 | 93 |
94 BooleanPrefMember* clear_local_state_on_exit() const { | |
95 return &clear_local_state_on_exit_; | |
96 } | |
97 | |
98 IntegerPrefMember* session_startup_pref() const { | 94 IntegerPrefMember* session_startup_pref() const { |
99 return &session_startup_pref_; | 95 return &session_startup_pref_; |
100 } | 96 } |
101 | 97 |
102 ChromeURLRequestContext* extensions_request_context() const { | 98 ChromeURLRequestContext* extensions_request_context() const { |
103 return extensions_request_context_.get(); | 99 return extensions_request_context_.get(); |
104 } | 100 } |
105 | 101 |
106 BooleanPrefMember* safe_browsing_enabled() const { | 102 BooleanPrefMember* safe_browsing_enabled() const { |
107 return &safe_browsing_enabled_; | 103 return &safe_browsing_enabled_; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 scoped_ptr<net::HttpTransactionFactory> http_factory_; | 138 scoped_ptr<net::HttpTransactionFactory> http_factory_; |
143 }; | 139 }; |
144 | 140 |
145 // Created on the UI thread, read on the IO thread during ProfileIOData lazy | 141 // Created on the UI thread, read on the IO thread during ProfileIOData lazy |
146 // initialization. | 142 // initialization. |
147 struct ProfileParams { | 143 struct ProfileParams { |
148 ProfileParams(); | 144 ProfileParams(); |
149 ~ProfileParams(); | 145 ~ProfileParams(); |
150 | 146 |
151 FilePath path; | 147 FilePath path; |
152 bool clear_local_state_on_exit; | |
153 std::string accept_language; | 148 std::string accept_language; |
154 std::string accept_charset; | 149 std::string accept_charset; |
155 std::string referrer_charset; | 150 std::string referrer_charset; |
156 IOThread* io_thread; | 151 IOThread* io_thread; |
157 scoped_refptr<CookieSettings> cookie_settings; | 152 scoped_refptr<CookieSettings> cookie_settings; |
158 scoped_refptr<net::SSLConfigService> ssl_config_service; | 153 scoped_refptr<net::SSLConfigService> ssl_config_service; |
159 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; | 154 scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate; |
160 scoped_refptr<ExtensionInfoMap> extension_info_map; | 155 scoped_refptr<ExtensionInfoMap> extension_info_map; |
161 | 156 |
162 #if defined(ENABLE_NOTIFICATIONS) | 157 #if defined(ENABLE_NOTIFICATIONS) |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 | 290 |
296 // Tracks whether or not we've been lazily initialized. | 291 // Tracks whether or not we've been lazily initialized. |
297 mutable bool initialized_; | 292 mutable bool initialized_; |
298 | 293 |
299 // 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. |
300 // Deleted after lazy initialization. | 295 // Deleted after lazy initialization. |
301 mutable scoped_ptr<ProfileParams> profile_params_; | 296 mutable scoped_ptr<ProfileParams> profile_params_; |
302 | 297 |
303 // Member variables which are pointed to by the various context objects. | 298 // Member variables which are pointed to by the various context objects. |
304 mutable BooleanPrefMember enable_referrers_; | 299 mutable BooleanPrefMember enable_referrers_; |
305 mutable BooleanPrefMember clear_local_state_on_exit_; | |
306 mutable BooleanPrefMember safe_browsing_enabled_; | 300 mutable BooleanPrefMember safe_browsing_enabled_; |
307 // TODO(marja): Remove session_startup_pref_ if no longer needed. | 301 // TODO(marja): Remove session_startup_pref_ if no longer needed. |
308 mutable IntegerPrefMember session_startup_pref_; | 302 mutable IntegerPrefMember session_startup_pref_; |
309 | 303 |
310 // The state of metrics reporting in the browser that this profile runs on. | 304 // The state of metrics reporting in the browser that this profile runs on. |
311 // Unfortunately, since ChromeOS has a separate representation of this state, | 305 // Unfortunately, since ChromeOS has a separate representation of this state, |
312 // we need to make one available based on the platform. | 306 // we need to make one available based on the platform. |
313 #if defined(OS_CHROMEOS) | 307 #if defined(OS_CHROMEOS) |
314 bool enable_metrics_; | 308 bool enable_metrics_; |
315 #else | 309 #else |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 | 347 |
354 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 348 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
355 bool initialized_on_UI_thread_; | 349 bool initialized_on_UI_thread_; |
356 | 350 |
357 bool is_incognito_; | 351 bool is_incognito_; |
358 | 352 |
359 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 353 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
360 }; | 354 }; |
361 | 355 |
362 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 356 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |