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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 } | 176 } |
177 | 177 |
178 net::URLRequestContext* extensions_request_context() const { | 178 net::URLRequestContext* extensions_request_context() const { |
179 return extensions_request_context_.get(); | 179 return extensions_request_context_.get(); |
180 } | 180 } |
181 | 181 |
182 BooleanPrefMember* safe_browsing_enabled() const { | 182 BooleanPrefMember* safe_browsing_enabled() const { |
183 return &safe_browsing_enabled_; | 183 return &safe_browsing_enabled_; |
184 } | 184 } |
185 | 185 |
186 // TODO(feng): move the function to protected area. | |
187 // IsDataReductionProxyEnabled() should be used as public API. | |
188 BooleanPrefMember* data_reduction_proxy_enabled() const { | |
189 return &data_reduction_proxy_enabled_; | |
190 } | |
191 | |
192 BooleanPrefMember* printing_enabled() const { | 186 BooleanPrefMember* printing_enabled() const { |
193 return &printing_enabled_; | 187 return &printing_enabled_; |
194 } | 188 } |
195 | 189 |
196 BooleanPrefMember* sync_disabled() const { | 190 BooleanPrefMember* sync_disabled() const { |
197 return &sync_disabled_; | 191 return &sync_disabled_; |
198 } | 192 } |
199 | 193 |
200 BooleanPrefMember* signin_allowed() const { | 194 BooleanPrefMember* signin_allowed() const { |
201 return &signin_allowed_; | 195 return &signin_allowed_; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // only to be called on the UI thread. | 248 // only to be called on the UI thread. |
255 void InitializeMetricsEnabledStateOnUIThread(); | 249 void InitializeMetricsEnabledStateOnUIThread(); |
256 | 250 |
257 // Returns whether or not metrics reporting is enabled in the browser instance | 251 // Returns whether or not metrics reporting is enabled in the browser instance |
258 // on which this profile resides. This is safe for use from the IO thread, and | 252 // on which this profile resides. This is safe for use from the IO thread, and |
259 // should only be called from there. | 253 // should only be called from there. |
260 bool GetMetricsEnabledStateOnIOThread() const; | 254 bool GetMetricsEnabledStateOnIOThread() const; |
261 | 255 |
262 // Returns whether or not data reduction proxy is enabled in the browser | 256 // Returns whether or not data reduction proxy is enabled in the browser |
263 // instance on which this profile resides. | 257 // instance on which this profile resides. |
264 bool IsDataReductionProxyEnabled() const; | 258 virtual bool IsDataReductionProxyEnabled() const; |
265 | 259 |
266 void set_client_cert_store_factory_for_testing( | 260 void set_client_cert_store_factory_for_testing( |
267 const base::Callback<scoped_ptr<net::ClientCertStore>()>& factory) { | 261 const base::Callback<scoped_ptr<net::ClientCertStore>()>& factory) { |
268 client_cert_store_factory_ = factory; | 262 client_cert_store_factory_ = factory; |
269 } | 263 } |
270 | 264 |
271 protected: | 265 protected: |
272 // A URLRequestContext for media that owns its HTTP factory, to ensure | 266 // A URLRequestContext for media that owns its HTTP factory, to ensure |
273 // it is deleted. | 267 // it is deleted. |
274 class MediaRequestContext : public net::URLRequestContext { | 268 class MediaRequestContext : public net::URLRequestContext { |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 | 601 |
608 mutable StringListPrefMember one_click_signin_rejected_email_list_; | 602 mutable StringListPrefMember one_click_signin_rejected_email_list_; |
609 | 603 |
610 mutable scoped_refptr<MediaDeviceIDSalt> media_device_id_salt_; | 604 mutable scoped_refptr<MediaDeviceIDSalt> media_device_id_salt_; |
611 | 605 |
612 // Member variables which are pointed to by the various context objects. | 606 // Member variables which are pointed to by the various context objects. |
613 mutable BooleanPrefMember enable_referrers_; | 607 mutable BooleanPrefMember enable_referrers_; |
614 mutable BooleanPrefMember enable_do_not_track_; | 608 mutable BooleanPrefMember enable_do_not_track_; |
615 mutable BooleanPrefMember force_safesearch_; | 609 mutable BooleanPrefMember force_safesearch_; |
616 mutable BooleanPrefMember safe_browsing_enabled_; | 610 mutable BooleanPrefMember safe_browsing_enabled_; |
617 mutable BooleanPrefMember data_reduction_proxy_enabled_; | |
618 mutable BooleanPrefMember printing_enabled_; | 611 mutable BooleanPrefMember printing_enabled_; |
619 mutable BooleanPrefMember sync_disabled_; | 612 mutable BooleanPrefMember sync_disabled_; |
620 mutable BooleanPrefMember signin_allowed_; | 613 mutable BooleanPrefMember signin_allowed_; |
621 mutable IntegerPrefMember network_prediction_options_; | 614 mutable IntegerPrefMember network_prediction_options_; |
622 // TODO(marja): Remove session_startup_pref_ if no longer needed. | 615 // TODO(marja): Remove session_startup_pref_ if no longer needed. |
623 mutable IntegerPrefMember session_startup_pref_; | 616 mutable IntegerPrefMember session_startup_pref_; |
624 mutable BooleanPrefMember quick_check_enabled_; | 617 mutable BooleanPrefMember quick_check_enabled_; |
625 mutable IntegerPrefMember incognito_availibility_pref_; | 618 mutable IntegerPrefMember incognito_availibility_pref_; |
626 | 619 |
627 // The state of metrics reporting in the browser that this profile runs on. | 620 // The state of metrics reporting in the browser that this profile runs on. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 | 702 |
710 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 703 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
711 bool initialized_on_UI_thread_; | 704 bool initialized_on_UI_thread_; |
712 | 705 |
713 const Profile::ProfileType profile_type_; | 706 const Profile::ProfileType profile_type_; |
714 | 707 |
715 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 708 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
716 }; | 709 }; |
717 | 710 |
718 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 711 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |