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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "net/http/http_network_session.h" | 36 #include "net/http/http_network_session.h" |
37 #include "net/url_request/url_request_context.h" | 37 #include "net/url_request/url_request_context.h" |
38 #include "net/url_request/url_request_interceptor.h" | 38 #include "net/url_request/url_request_interceptor.h" |
39 #include "net/url_request/url_request_job_factory.h" | 39 #include "net/url_request/url_request_job_factory.h" |
40 | 40 |
41 class ChromeHttpUserAgentSettings; | 41 class ChromeHttpUserAgentSettings; |
42 class ChromeNetworkDelegate; | 42 class ChromeNetworkDelegate; |
43 class ChromeURLRequestContextGetter; | 43 class ChromeURLRequestContextGetter; |
44 class ChromeExpectCTReporter; | 44 class ChromeExpectCTReporter; |
45 class HostContentSettingsMap; | 45 class HostContentSettingsMap; |
46 class MediaDeviceIDSalt; | |
47 class NetHttpSessionParamsObserver; | 46 class NetHttpSessionParamsObserver; |
48 class ProtocolHandlerRegistry; | 47 class ProtocolHandlerRegistry; |
49 | 48 |
50 namespace chromeos { | 49 namespace chromeos { |
51 class CertificateProvider; | 50 class CertificateProvider; |
52 } | 51 } |
53 | 52 |
54 namespace chrome_browser_net { | 53 namespace chrome_browser_net { |
55 class ResourcePrefetchPredictorObserver; | 54 class ResourcePrefetchPredictorObserver; |
56 } | 55 } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 172 } |
174 | 173 |
175 BooleanPrefMember* safe_browsing_enabled() const { | 174 BooleanPrefMember* safe_browsing_enabled() const { |
176 return &safe_browsing_enabled_; | 175 return &safe_browsing_enabled_; |
177 } | 176 } |
178 | 177 |
179 IntegerPrefMember* network_prediction_options() const { | 178 IntegerPrefMember* network_prediction_options() const { |
180 return &network_prediction_options_; | 179 return &network_prediction_options_; |
181 } | 180 } |
182 | 181 |
183 bool HasMediaDeviceIDSalt() const { | |
184 return media_device_id_salt_.get() != nullptr; | |
185 } | |
186 | |
187 std::string GetMediaDeviceIDSalt() const; | |
188 | |
189 DevToolsNetworkControllerHandle* network_controller_handle() const { | 182 DevToolsNetworkControllerHandle* network_controller_handle() const { |
190 return &network_controller_handle_; | 183 return &network_controller_handle_; |
191 } | 184 } |
192 | 185 |
193 net::TransportSecurityState* transport_security_state() const { | 186 net::TransportSecurityState* transport_security_state() const { |
194 return transport_security_state_.get(); | 187 return transport_security_state_.get(); |
195 } | 188 } |
196 | 189 |
197 #if defined(OS_CHROMEOS) | 190 #if defined(OS_CHROMEOS) |
198 std::string username_hash() const { | 191 std::string username_hash() const { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 | 419 |
427 private: | 420 private: |
428 class ResourceContext : public content::ResourceContext { | 421 class ResourceContext : public content::ResourceContext { |
429 public: | 422 public: |
430 explicit ResourceContext(ProfileIOData* io_data); | 423 explicit ResourceContext(ProfileIOData* io_data); |
431 ~ResourceContext() override; | 424 ~ResourceContext() override; |
432 | 425 |
433 // ResourceContext implementation: | 426 // ResourceContext implementation: |
434 net::HostResolver* GetHostResolver() override; | 427 net::HostResolver* GetHostResolver() override; |
435 net::URLRequestContext* GetRequestContext() override; | 428 net::URLRequestContext* GetRequestContext() override; |
436 std::string GetMediaDeviceIDSalt() override; | |
437 | 429 |
438 private: | 430 private: |
439 friend class ProfileIOData; | 431 friend class ProfileIOData; |
440 | 432 |
441 ProfileIOData* const io_data_; | 433 ProfileIOData* const io_data_; |
442 | 434 |
443 net::HostResolver* host_resolver_; | 435 net::HostResolver* host_resolver_; |
444 net::URLRequestContext* request_context_; | 436 net::URLRequestContext* request_context_; |
445 }; | 437 }; |
446 | 438 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 // Data from the UI thread from the Profile, used to initialize ProfileIOData. | 511 // Data from the UI thread from the Profile, used to initialize ProfileIOData. |
520 // Deleted after lazy initialization. | 512 // Deleted after lazy initialization. |
521 mutable std::unique_ptr<ProfileParams> profile_params_; | 513 mutable std::unique_ptr<ProfileParams> profile_params_; |
522 | 514 |
523 // Used for testing. | 515 // Used for testing. |
524 mutable base::Callback<std::unique_ptr<net::ClientCertStore>()> | 516 mutable base::Callback<std::unique_ptr<net::ClientCertStore>()> |
525 client_cert_store_factory_; | 517 client_cert_store_factory_; |
526 | 518 |
527 mutable StringPrefMember google_services_user_account_id_; | 519 mutable StringPrefMember google_services_user_account_id_; |
528 | 520 |
529 mutable scoped_refptr<MediaDeviceIDSalt> media_device_id_salt_; | |
530 | |
531 // Member variables which are pointed to by the various context objects. | 521 // Member variables which are pointed to by the various context objects. |
532 mutable BooleanPrefMember enable_referrers_; | 522 mutable BooleanPrefMember enable_referrers_; |
533 mutable BooleanPrefMember enable_do_not_track_; | 523 mutable BooleanPrefMember enable_do_not_track_; |
534 mutable BooleanPrefMember force_google_safesearch_; | 524 mutable BooleanPrefMember force_google_safesearch_; |
535 mutable IntegerPrefMember force_youtube_restrict_; | 525 mutable IntegerPrefMember force_youtube_restrict_; |
536 mutable BooleanPrefMember safe_browsing_enabled_; | 526 mutable BooleanPrefMember safe_browsing_enabled_; |
537 mutable StringPrefMember allowed_domains_for_apps_; | 527 mutable StringPrefMember allowed_domains_for_apps_; |
538 mutable IntegerPrefMember network_prediction_options_; | 528 mutable IntegerPrefMember network_prediction_options_; |
539 mutable IntegerPrefMember incognito_availibility_pref_; | 529 mutable IntegerPrefMember incognito_availibility_pref_; |
540 | 530 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> | 607 mutable std::unique_ptr<certificate_transparency::TreeStateTracker> |
618 ct_tree_tracker_; | 608 ct_tree_tracker_; |
619 mutable base::Closure ct_tree_tracker_unregistration_; | 609 mutable base::Closure ct_tree_tracker_unregistration_; |
620 | 610 |
621 const Profile::ProfileType profile_type_; | 611 const Profile::ProfileType profile_type_; |
622 | 612 |
623 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 613 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
624 }; | 614 }; |
625 | 615 |
626 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 616 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |