Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: chrome/browser/profiles/profile_io_data.h

Issue 684223003: Data Reduction Proxy Interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding tests and addressing comments Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 17 matching lines...) Expand all
28 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usag e_stats.h" 28 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usag e_stats.h"
29 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event _store.h" 29 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_event _store.h"
30 #include "content/public/browser/content_browser_client.h" 30 #include "content/public/browser/content_browser_client.h"
31 #include "content/public/browser/resource_context.h" 31 #include "content/public/browser/resource_context.h"
32 #include "net/cookies/cookie_monster.h" 32 #include "net/cookies/cookie_monster.h"
33 #include "net/http/http_cache.h" 33 #include "net/http/http_cache.h"
34 #include "net/http/http_network_session.h" 34 #include "net/http/http_network_session.h"
35 #include "net/url_request/url_request_context.h" 35 #include "net/url_request/url_request_context.h"
36 #include "net/url_request/url_request_job_factory.h" 36 #include "net/url_request/url_request_job_factory.h"
37 37
38 #if defined(OS_ANDROID)
39 #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_u i_service.h"
40 #endif
41
38 class ChromeHttpUserAgentSettings; 42 class ChromeHttpUserAgentSettings;
39 class ChromeNetworkDelegate; 43 class ChromeNetworkDelegate;
40 class ChromeURLRequestContextGetter; 44 class ChromeURLRequestContextGetter;
41 class CookieSettings; 45 class CookieSettings;
42 class DevToolsNetworkController; 46 class DevToolsNetworkController;
43 class HostContentSettingsMap; 47 class HostContentSettingsMap;
44 class MediaDeviceIDSalt; 48 class MediaDeviceIDSalt;
45 class ProtocolHandlerRegistry; 49 class ProtocolHandlerRegistry;
46 class SigninNamesOnIOThread; 50 class SigninNamesOnIOThread;
47 class SupervisedUserURLFilter; 51 class SupervisedUserURLFilter;
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 content::ResourceContext::SaltCallback GetMediaDeviceIDSalt() const; 207 content::ResourceContext::SaltCallback GetMediaDeviceIDSalt() const;
204 208
205 DevToolsNetworkController* network_controller() const { 209 DevToolsNetworkController* network_controller() const {
206 return network_controller_.get(); 210 return network_controller_.get();
207 } 211 }
208 212
209 net::TransportSecurityState* transport_security_state() const { 213 net::TransportSecurityState* transport_security_state() const {
210 return transport_security_state_.get(); 214 return transport_security_state_.get();
211 } 215 }
212 216
217 data_reduction_proxy::DataReductionProxyParams* data_reduction_proxy_params()
bengr 2014/12/29 18:45:41 Forward declare DRPParams.
megjablon 2014/12/30 23:39:59 I wonder why this wasn't done before. Done.
218 const {
219 return data_reduction_proxy_params_.get();
220 }
221
222 #if defined(OS_ANDROID)
223 data_reduction_proxy::DataReductionProxyUIService*
224 data_reduction_proxy_ui_service() const {
225 return data_reduction_proxy_ui_service_.get();
226 }
227 #endif
228
213 #if defined(OS_CHROMEOS) 229 #if defined(OS_CHROMEOS)
214 std::string username_hash() const { 230 std::string username_hash() const {
215 return username_hash_; 231 return username_hash_;
216 } 232 }
217 233
218 bool use_system_key_slot() const { return use_system_key_slot_; } 234 bool use_system_key_slot() const { return use_system_key_slot_; }
219 #endif 235 #endif
220 236
221 Profile::ProfileType profile_type() const { 237 Profile::ProfileType profile_type() const {
222 return profile_type_; 238 return profile_type_;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 void ShutdownOnUIThread( 380 void ShutdownOnUIThread(
365 scoped_ptr<ChromeURLRequestContextGetterVector> context_getters); 381 scoped_ptr<ChromeURLRequestContextGetterVector> context_getters);
366 382
367 // A ChannelIDService object is created by a derived class of 383 // A ChannelIDService object is created by a derived class of
368 // ProfileIOData, and the derived class calls this method to set the 384 // ProfileIOData, and the derived class calls this method to set the
369 // channel_id_service_ member and transfers ownership to the base 385 // channel_id_service_ member and transfers ownership to the base
370 // class. 386 // class.
371 void set_channel_id_service( 387 void set_channel_id_service(
372 net::ChannelIDService* channel_id_service) const; 388 net::ChannelIDService* channel_id_service) const;
373 389
374 data_reduction_proxy::DataReductionProxyParams* data_reduction_proxy_params()
375 const {
376 return data_reduction_proxy_params_.get();
377 }
378
379 void set_data_reduction_proxy_params( 390 void set_data_reduction_proxy_params(
380 scoped_ptr<data_reduction_proxy::DataReductionProxyParams> 391 scoped_ptr<data_reduction_proxy::DataReductionProxyParams>
381 data_reduction_proxy_params) const { 392 data_reduction_proxy_params) const {
382 data_reduction_proxy_params_ = data_reduction_proxy_params.Pass(); 393 data_reduction_proxy_params_ = data_reduction_proxy_params.Pass();
383 } 394 }
384 395
385 data_reduction_proxy::DataReductionProxyUsageStats* 396 data_reduction_proxy::DataReductionProxyUsageStats*
386 data_reduction_proxy_usage_stats() const { 397 data_reduction_proxy_usage_stats() const {
387 return data_reduction_proxy_usage_stats_.get(); 398 return data_reduction_proxy_usage_stats_.get();
388 } 399 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 data_reduction_proxy_auth_request_handler) const { 448 data_reduction_proxy_auth_request_handler) const {
438 data_reduction_proxy_auth_request_handler_ = 449 data_reduction_proxy_auth_request_handler_ =
439 data_reduction_proxy_auth_request_handler.Pass(); 450 data_reduction_proxy_auth_request_handler.Pass();
440 } 451 }
441 452
442 data_reduction_proxy::DataReductionProxyEventStore* 453 data_reduction_proxy::DataReductionProxyEventStore*
443 data_reduction_proxy_event_store() const { 454 data_reduction_proxy_event_store() const {
444 return data_reduction_proxy_event_store_.get(); 455 return data_reduction_proxy_event_store_.get();
445 } 456 }
446 457
458 #if defined(OS_ANDROID)
459 void set_data_reduction_proxy_ui_service(
460 scoped_ptr<data_reduction_proxy::DataReductionProxyUIService>
461 data_reduction_proxy_ui_service) const {
462 data_reduction_proxy_ui_service_ =
463 data_reduction_proxy_ui_service.Pass();
464 }
465 #endif
466
447 void set_data_reduction_proxy_event_store( 467 void set_data_reduction_proxy_event_store(
448 scoped_ptr<data_reduction_proxy::DataReductionProxyEventStore> 468 scoped_ptr<data_reduction_proxy::DataReductionProxyEventStore>
449 data_reduction_proxy_event_store) const { 469 data_reduction_proxy_event_store) const {
450 data_reduction_proxy_event_store_ = 470 data_reduction_proxy_event_store_ =
451 data_reduction_proxy_event_store.Pass(); 471 data_reduction_proxy_event_store.Pass();
452 } 472 }
453 473
454 net::FraudulentCertificateReporter* fraudulent_certificate_reporter() const { 474 net::FraudulentCertificateReporter* fraudulent_certificate_reporter() const {
455 return fraudulent_certificate_reporter_.get(); 475 return fraudulent_certificate_reporter_.get();
456 } 476 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 data_reduction_proxy_usage_stats_; 680 data_reduction_proxy_usage_stats_;
661 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs> 681 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>
662 data_reduction_proxy_statistics_prefs_; 682 data_reduction_proxy_statistics_prefs_;
663 mutable base::Callback<void(bool)> data_reduction_proxy_unavailable_callback_; 683 mutable base::Callback<void(bool)> data_reduction_proxy_unavailable_callback_;
664 mutable scoped_ptr<DataReductionProxyChromeConfigurator> 684 mutable scoped_ptr<DataReductionProxyChromeConfigurator>
665 data_reduction_proxy_chrome_configurator_; 685 data_reduction_proxy_chrome_configurator_;
666 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> 686 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler>
667 data_reduction_proxy_auth_request_handler_; 687 data_reduction_proxy_auth_request_handler_;
668 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyEventStore> 688 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyEventStore>
669 data_reduction_proxy_event_store_; 689 data_reduction_proxy_event_store_;
690 #if defined(OS_ANDROID)
691 // Must be declared after the DataReductionProxyChromeConfigurator, because
692 // the configurator must be valid for the service's entire lifetime.
693 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyUIService>
694 data_reduction_proxy_ui_service_;
695 #endif
670 696
671 mutable scoped_ptr<net::FraudulentCertificateReporter> 697 mutable scoped_ptr<net::FraudulentCertificateReporter>
672 fraudulent_certificate_reporter_; 698 fraudulent_certificate_reporter_;
673 mutable scoped_ptr<net::ProxyService> proxy_service_; 699 mutable scoped_ptr<net::ProxyService> proxy_service_;
674 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_; 700 mutable scoped_ptr<net::TransportSecurityState> transport_security_state_;
675 mutable scoped_ptr<net::HttpServerProperties> 701 mutable scoped_ptr<net::HttpServerProperties>
676 http_server_properties_; 702 http_server_properties_;
677 #if defined(OS_CHROMEOS) 703 #if defined(OS_CHROMEOS)
678 // Set to |cert_verifier_| if it references a PolicyCertVerifier. In that 704 // Set to |cert_verifier_| if it references a PolicyCertVerifier. In that
679 // case, the verifier is owned by |cert_verifier_|. Otherwise, set to NULL. 705 // case, the verifier is owned by |cert_verifier_|. Otherwise, set to NULL.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 741
716 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. 742 // TODO(jhawkins): Remove once crbug.com/102004 is fixed.
717 bool initialized_on_UI_thread_; 743 bool initialized_on_UI_thread_;
718 744
719 const Profile::ProfileType profile_type_; 745 const Profile::ProfileType profile_type_;
720 746
721 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); 747 DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
722 }; 748 };
723 749
724 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 750 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698