| 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 | 10 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 } | 163 } |
| 164 | 164 |
| 165 ChromeURLRequestContext* extensions_request_context() const { | 165 ChromeURLRequestContext* extensions_request_context() const { |
| 166 return extensions_request_context_.get(); | 166 return extensions_request_context_.get(); |
| 167 } | 167 } |
| 168 | 168 |
| 169 BooleanPrefMember* safe_browsing_enabled() const { | 169 BooleanPrefMember* safe_browsing_enabled() const { |
| 170 return &safe_browsing_enabled_; | 170 return &safe_browsing_enabled_; |
| 171 } | 171 } |
| 172 | 172 |
| 173 #if defined(OS_ANDROID) |
| 174 // TODO(feng): move the function to protected area. |
| 175 // IsDataReductionProxyEnabled() should be used as public API. |
| 173 BooleanPrefMember* data_reduction_proxy_enabled() const { | 176 BooleanPrefMember* data_reduction_proxy_enabled() const { |
| 174 return &data_reduction_proxy_enabled_; | 177 return &data_reduction_proxy_enabled_; |
| 175 } | 178 } |
| 179 #endif |
| 176 | 180 |
| 177 BooleanPrefMember* printing_enabled() const { | 181 BooleanPrefMember* printing_enabled() const { |
| 178 return &printing_enabled_; | 182 return &printing_enabled_; |
| 179 } | 183 } |
| 180 | 184 |
| 181 BooleanPrefMember* sync_disabled() const { | 185 BooleanPrefMember* sync_disabled() const { |
| 182 return &sync_disabled_; | 186 return &sync_disabled_; |
| 183 } | 187 } |
| 184 | 188 |
| 185 BooleanPrefMember* signin_allowed() const { | 189 BooleanPrefMember* signin_allowed() const { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 239 |
| 236 // Initialize the member needed to track the metrics enabled state. This is | 240 // Initialize the member needed to track the metrics enabled state. This is |
| 237 // only to be called on the UI thread. | 241 // only to be called on the UI thread. |
| 238 void InitializeMetricsEnabledStateOnUIThread(); | 242 void InitializeMetricsEnabledStateOnUIThread(); |
| 239 | 243 |
| 240 // Returns whether or not metrics reporting is enabled in the browser instance | 244 // Returns whether or not metrics reporting is enabled in the browser instance |
| 241 // on which this profile resides. This is safe for use from the IO thread, and | 245 // on which this profile resides. This is safe for use from the IO thread, and |
| 242 // should only be called from there. | 246 // should only be called from there. |
| 243 bool GetMetricsEnabledStateOnIOThread() const; | 247 bool GetMetricsEnabledStateOnIOThread() const; |
| 244 | 248 |
| 249 #if defined(OS_ANDROID) |
| 250 // Returns whether or not data reduction proxy is enabled in the browser |
| 251 // instance on which this profile resides. |
| 252 bool IsDataReductionProxyEnabled() const; |
| 253 #endif |
| 254 |
| 245 void set_client_cert_store_factory_for_testing( | 255 void set_client_cert_store_factory_for_testing( |
| 246 const base::Callback<scoped_ptr<net::ClientCertStore>()>& factory) { | 256 const base::Callback<scoped_ptr<net::ClientCertStore>()>& factory) { |
| 247 client_cert_store_factory_ = factory; | 257 client_cert_store_factory_ = factory; |
| 248 } | 258 } |
| 249 | 259 |
| 250 protected: | 260 protected: |
| 251 // A URLRequestContext for media that owns its HTTP factory, to ensure | 261 // A URLRequestContext for media that owns its HTTP factory, to ensure |
| 252 // it is deleted. | 262 // it is deleted. |
| 253 class MediaRequestContext : public ChromeURLRequestContext { | 263 class MediaRequestContext : public ChromeURLRequestContext { |
| 254 public: | 264 public: |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 | 537 |
| 528 mutable StringListPrefMember one_click_signin_rejected_email_list_; | 538 mutable StringListPrefMember one_click_signin_rejected_email_list_; |
| 529 | 539 |
| 530 mutable scoped_refptr<MediaDeviceIDSalt> media_device_id_salt_; | 540 mutable scoped_refptr<MediaDeviceIDSalt> media_device_id_salt_; |
| 531 | 541 |
| 532 // Member variables which are pointed to by the various context objects. | 542 // Member variables which are pointed to by the various context objects. |
| 533 mutable BooleanPrefMember enable_referrers_; | 543 mutable BooleanPrefMember enable_referrers_; |
| 534 mutable BooleanPrefMember enable_do_not_track_; | 544 mutable BooleanPrefMember enable_do_not_track_; |
| 535 mutable BooleanPrefMember force_safesearch_; | 545 mutable BooleanPrefMember force_safesearch_; |
| 536 mutable BooleanPrefMember safe_browsing_enabled_; | 546 mutable BooleanPrefMember safe_browsing_enabled_; |
| 547 #if defined(OS_ANDROID) |
| 537 mutable BooleanPrefMember data_reduction_proxy_enabled_; | 548 mutable BooleanPrefMember data_reduction_proxy_enabled_; |
| 549 #endif |
| 538 mutable BooleanPrefMember printing_enabled_; | 550 mutable BooleanPrefMember printing_enabled_; |
| 539 mutable BooleanPrefMember sync_disabled_; | 551 mutable BooleanPrefMember sync_disabled_; |
| 540 mutable BooleanPrefMember signin_allowed_; | 552 mutable BooleanPrefMember signin_allowed_; |
| 541 mutable BooleanPrefMember network_prediction_enabled_; | 553 mutable BooleanPrefMember network_prediction_enabled_; |
| 542 mutable IntegerPrefMember network_prediction_options_; | 554 mutable IntegerPrefMember network_prediction_options_; |
| 543 // TODO(marja): Remove session_startup_pref_ if no longer needed. | 555 // TODO(marja): Remove session_startup_pref_ if no longer needed. |
| 544 mutable IntegerPrefMember session_startup_pref_; | 556 mutable IntegerPrefMember session_startup_pref_; |
| 545 mutable BooleanPrefMember quick_check_enabled_; | 557 mutable BooleanPrefMember quick_check_enabled_; |
| 546 mutable IntegerPrefMember incognito_availibility_pref_; | 558 mutable IntegerPrefMember incognito_availibility_pref_; |
| 547 | 559 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 | 616 |
| 605 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 617 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
| 606 bool initialized_on_UI_thread_; | 618 bool initialized_on_UI_thread_; |
| 607 | 619 |
| 608 const Profile::ProfileType profile_type_; | 620 const Profile::ProfileType profile_type_; |
| 609 | 621 |
| 610 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 622 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
| 611 }; | 623 }; |
| 612 | 624 |
| 613 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 625 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
| OLD | NEW |