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

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 734263003: Move data reduction proxy logic out of chrome and android webview network delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing test and addressing mmenke 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 #include "chrome/browser/profiles/profile_impl_io_data.h" 5 #include "chrome/browser/profiles/profile_impl_io_data.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 19 matching lines...) Expand all
30 #include "chrome/browser/net/quota_policy_channel_id_store.h" 30 #include "chrome/browser/net/quota_policy_channel_id_store.h"
31 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator. h" 31 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator. h"
32 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 32 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
33 #include "chrome/browser/profiles/profile.h" 33 #include "chrome/browser/profiles/profile.h"
34 #include "chrome/common/chrome_constants.h" 34 #include "chrome/common/chrome_constants.h"
35 #include "chrome/common/chrome_switches.h" 35 #include "chrome/common/chrome_switches.h"
36 #include "chrome/common/pref_names.h" 36 #include "chrome/common/pref_names.h"
37 #include "chrome/common/url_constants.h" 37 #include "chrome/common/url_constants.h"
38 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth _request_handler.h" 38 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth _request_handler.h"
39 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_inte rceptor.h" 39 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_inte rceptor.h"
40 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_netw ork_delegate.h"
40 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prot ocol.h" 41 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prot ocol.h"
41 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_stat istics_prefs.h" 42 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_stat istics_prefs.h"
42 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usag e_stats.h" 43 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usag e_stats.h"
43 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h" 44 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h"
44 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h" 45 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h"
45 #include "components/domain_reliability/monitor.h" 46 #include "components/domain_reliability/monitor.h"
46 #include "content/public/browser/browser_thread.h" 47 #include "content/public/browser/browser_thread.h"
47 #include "content/public/browser/cookie_store_factory.h" 48 #include "content/public/browser/cookie_store_factory.h"
48 #include "content/public/browser/notification_service.h" 49 #include "content/public/browser/notification_service.h"
49 #include "content/public/browser/resource_context.h" 50 #include "content/public/browser/resource_context.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 save_prefs = !chromeos::ProfileHelper::IsSigninProfile(profile_); 111 save_prefs = !chromeos::ProfileHelper::IsSigninProfile(profile_);
111 #endif 112 #endif
112 if (save_prefs) 113 if (save_prefs)
113 io_data_->predictor_->SaveStateForNextStartupAndTrim(); 114 io_data_->predictor_->SaveStateForNextStartupAndTrim();
114 io_data_->predictor_->ShutdownOnUIThread(); 115 io_data_->predictor_->ShutdownOnUIThread();
115 } 116 }
116 117
117 if (io_data_->http_server_properties_manager_) 118 if (io_data_->http_server_properties_manager_)
118 io_data_->http_server_properties_manager_->ShutdownOnPrefThread(); 119 io_data_->http_server_properties_manager_->ShutdownOnPrefThread();
119 120
120 io_data_->data_reduction_proxy_enabled()->Destroy(); 121 io_data_->data_reduction_proxy_enabled_ui()->Destroy();
122 io_data_->data_reduction_proxy_enabled_io()->Destroy();
mmenke 2014/12/04 19:20:07 Rather than having accessors for these, the handle
megjablon 2014/12/04 20:31:00 Done.
121 io_data_->ShutdownOnUIThread(GetAllContextGetters().Pass()); 123 io_data_->ShutdownOnUIThread(GetAllContextGetters().Pass());
122 } 124 }
123 125
124 void ProfileImplIOData::Handle::Init( 126 void ProfileImplIOData::Handle::Init(
125 const base::FilePath& cookie_path, 127 const base::FilePath& cookie_path,
126 const base::FilePath& channel_id_path, 128 const base::FilePath& channel_id_path,
127 const base::FilePath& cache_path, 129 const base::FilePath& cache_path,
128 int cache_max_size, 130 int cache_max_size,
129 const base::FilePath& media_cache_path, 131 const base::FilePath& media_cache_path,
130 int media_cache_max_size, 132 int media_cache_max_size,
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 io_data_->session_startup_pref()->Init( 360 io_data_->session_startup_pref()->Init(
359 prefs::kRestoreOnStartup, pref_service); 361 prefs::kRestoreOnStartup, pref_service);
360 io_data_->session_startup_pref()->MoveToThread( 362 io_data_->session_startup_pref()->MoveToThread(
361 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 363 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
362 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING) 364 #if defined(FULL_SAFE_BROWSING) || defined(MOBILE_SAFE_BROWSING)
363 io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled, 365 io_data_->safe_browsing_enabled()->Init(prefs::kSafeBrowsingEnabled,
364 pref_service); 366 pref_service);
365 io_data_->safe_browsing_enabled()->MoveToThread( 367 io_data_->safe_browsing_enabled()->MoveToThread(
366 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 368 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
367 #endif 369 #endif
368 io_data_->data_reduction_proxy_enabled()->Init( 370 io_data_->data_reduction_proxy_enabled_ui()->Init(
371 data_reduction_proxy::prefs::kDataReductionProxyEnabled, pref_service);
372 io_data_->data_reduction_proxy_enabled_io()->Init(
369 data_reduction_proxy::prefs::kDataReductionProxyEnabled, pref_service); 373 data_reduction_proxy::prefs::kDataReductionProxyEnabled, pref_service);
370 io_data_->data_reduction_proxy_enabled()->MoveToThread( 374 io_data_->data_reduction_proxy_enabled_io()->MoveToThread(
371 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); 375 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO));
372 io_data_->InitializeOnUIThread(profile_); 376 io_data_->InitializeOnUIThread(profile_);
373 } 377 }
374 378
375 scoped_ptr<ProfileIOData::ChromeURLRequestContextGetterVector> 379 scoped_ptr<ProfileIOData::ChromeURLRequestContextGetterVector>
376 ProfileImplIOData::Handle::GetAllContextGetters() { 380 ProfileImplIOData::Handle::GetAllContextGetters() {
377 ChromeURLRequestContextGetterMap::iterator iter; 381 ChromeURLRequestContextGetterMap::iterator iter;
378 scoped_ptr<ChromeURLRequestContextGetterVector> context_getters( 382 scoped_ptr<ChromeURLRequestContextGetterVector> context_getters(
379 new ChromeURLRequestContextGetterVector()); 383 new ChromeURLRequestContextGetterVector());
380 384
(...skipping 26 matching lines...) Expand all
407 ProfileImplIOData::LazyParams::~LazyParams() {} 411 ProfileImplIOData::LazyParams::~LazyParams() {}
408 412
409 ProfileImplIOData::ProfileImplIOData() 413 ProfileImplIOData::ProfileImplIOData()
410 : ProfileIOData(Profile::REGULAR_PROFILE), 414 : ProfileIOData(Profile::REGULAR_PROFILE),
411 http_server_properties_manager_(NULL), 415 http_server_properties_manager_(NULL),
412 app_cache_max_size_(0), 416 app_cache_max_size_(0),
413 app_media_cache_max_size_(0) { 417 app_media_cache_max_size_(0) {
414 } 418 }
415 419
416 ProfileImplIOData::~ProfileImplIOData() { 420 ProfileImplIOData::~ProfileImplIOData() {
417 if (initialized())
418 network_delegate()->set_domain_reliability_monitor(NULL);
419
420 DestroyResourceContext(); 421 DestroyResourceContext();
421 422
422 if (media_request_context_) 423 if (media_request_context_)
423 media_request_context_->AssertNoURLRequests(); 424 media_request_context_->AssertNoURLRequests();
424 } 425 }
425 426
426 void ProfileImplIOData::InitializeInternal( 427 void ProfileImplIOData::InitializeInternal(
428 scoped_ptr<ChromeNetworkDelegate> chrome_network_delegate,
mmenke 2014/12/04 19:20:07 With your current code, the ProfileIOData creates
mmenke 2014/12/04 19:20:57 Have the ProfileImplIOData keep ownership, rather.
megjablon 2014/12/04 20:31:00 Done. Let me know if I misunderstood what you want
427 ProfileParams* profile_params, 429 ProfileParams* profile_params,
428 content::ProtocolHandlerMap* protocol_handlers, 430 content::ProtocolHandlerMap* protocol_handlers,
429 content::URLRequestInterceptorScopedVector request_interceptors) const { 431 content::URLRequestInterceptorScopedVector request_interceptors) const {
430 net::URLRequestContext* main_context = main_request_context(); 432 net::URLRequestContext* main_context = main_request_context();
431 433
432 IOThread* const io_thread = profile_params->io_thread; 434 IOThread* const io_thread = profile_params->io_thread;
433 IOThread::Globals* const io_thread_globals = io_thread->globals(); 435 IOThread::Globals* const io_thread_globals = io_thread->globals();
434 436
437 chrome_network_delegate->set_predictor(predictor_.get());
438
439 if (domain_reliability_monitor_) {
440 domain_reliability::DomainReliabilityMonitor* monitor =
441 domain_reliability_monitor_.get();
442 monitor->InitURLRequestContext(main_context);
443 monitor->AddBakedInConfigs();
444 monitor->SetDiscardUploads(!GetMetricsEnabledStateOnIOThread());
445 chrome_network_delegate->set_domain_reliability_monitor(monitor);
446 }
447
435 set_data_reduction_proxy_auth_request_handler( 448 set_data_reduction_proxy_auth_request_handler(
436 scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> 449 scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler>
437 (new data_reduction_proxy::DataReductionProxyAuthRequestHandler( 450 (new data_reduction_proxy::DataReductionProxyAuthRequestHandler(
438 DataReductionProxyChromeSettings::GetClient(), 451 DataReductionProxyChromeSettings::GetClient(),
439 data_reduction_proxy_params(), 452 data_reduction_proxy_params(),
440 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)))); 453 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))));
441 set_data_reduction_proxy_usage_stats( 454 set_data_reduction_proxy_usage_stats(
442 scoped_ptr<data_reduction_proxy::DataReductionProxyUsageStats> 455 scoped_ptr<data_reduction_proxy::DataReductionProxyUsageStats>
443 (new data_reduction_proxy::DataReductionProxyUsageStats( 456 (new data_reduction_proxy::DataReductionProxyUsageStats(
444 data_reduction_proxy_params(), 457 data_reduction_proxy_params(),
445 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI) 458 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)
446 .get()))); 459 .get())));
447 data_reduction_proxy_usage_stats()->set_unavailable_callback( 460 data_reduction_proxy_usage_stats()->set_unavailable_callback(
448 data_reduction_proxy_unavailable_callback()); 461 data_reduction_proxy_unavailable_callback());
449 462 scoped_ptr<data_reduction_proxy::DataReductionProxyNetworkDelegate>
mmenke 2014/12/04 19:20:07 Maybe a linebreak here? Or better, just pass in e
megjablon 2014/12/04 20:31:00 On webview we don't need all of these various argu
450 network_delegate()->set_data_reduction_proxy_enabled_pref( 463 data_reduction_proxy_network_delegate(
451 &data_reduction_proxy_enabled_); 464 new data_reduction_proxy::DataReductionProxyNetworkDelegate(
452 network_delegate()->set_data_reduction_proxy_params( 465 chrome_network_delegate.Pass(),
453 data_reduction_proxy_params()); 466 data_reduction_proxy_params(),
454 network_delegate()->set_data_reduction_proxy_usage_stats( 467 data_reduction_proxy_auth_request_handler(),
468 base::Bind(
469 &DataReductionProxyChromeConfigurator::GetProxyConfigOnIOThread,
470 base::Unretained(data_reduction_proxy_chrome_configurator()))));
471 data_reduction_proxy_network_delegate->InitProxyConfigOverrides(
472 base::Bind(data_reduction_proxy::OnResolveProxyHandler));
473 data_reduction_proxy_network_delegate->InitStatisticsPrefs(
474 &data_reduction_proxy_enabled_ui_,
mmenke 2014/12/04 19:20:07 Why are you passing a preference that lives on the
megjablon 2014/12/04 20:31:00 Good to know! Thanks. Fixed.
475 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
476 data_reduction_proxy_statistics_prefs());
477 data_reduction_proxy_network_delegate->InitStatisticsUMA(
478 &data_reduction_proxy_enabled_io_,
455 data_reduction_proxy_usage_stats()); 479 data_reduction_proxy_usage_stats());
456 network_delegate()->set_data_reduction_proxy_auth_request_handler(
457 data_reduction_proxy_auth_request_handler());
458 network_delegate()->set_data_reduction_proxy_statistics_prefs(
459 data_reduction_proxy_statistics_prefs());
460 network_delegate()->set_on_resolve_proxy_handler(
461 base::Bind(data_reduction_proxy::OnResolveProxyHandler));
462 network_delegate()->set_proxy_config_getter(
463 base::Bind(
464 &DataReductionProxyChromeConfigurator::GetProxyConfigOnIOThread,
465 base::Unretained(data_reduction_proxy_chrome_configurator())));
466 network_delegate()->set_predictor(predictor_.get());
467 480
468 // Initialize context members. 481 // Initialize context members.
469 482
470 ApplyProfileParamsToContext(main_context); 483 ApplyProfileParamsToContext(main_context);
471 484
472 if (http_server_properties_manager_) 485 if (http_server_properties_manager_)
473 http_server_properties_manager_->InitializeOnNetworkThread(); 486 http_server_properties_manager_->InitializeOnNetworkThread();
474 487
475 main_context->set_transport_security_state(transport_security_state()); 488 main_context->set_transport_security_state(transport_security_state());
476 489
477 main_context->set_net_log(io_thread->net_log()); 490 main_context->set_net_log(io_thread->net_log());
478 491
479 main_context->set_network_delegate(network_delegate()); 492 main_context->set_network_delegate(
493 data_reduction_proxy_network_delegate.get());
494
495 set_network_delegate(data_reduction_proxy_network_delegate.Pass());
480 496
481 main_context->set_http_server_properties(http_server_properties()); 497 main_context->set_http_server_properties(http_server_properties());
482 498
483 main_context->set_host_resolver( 499 main_context->set_host_resolver(
484 io_thread_globals->host_resolver.get()); 500 io_thread_globals->host_resolver.get());
485 main_context->set_cert_transparency_verifier( 501 main_context->set_cert_transparency_verifier(
486 io_thread_globals->cert_transparency_verifier.get()); 502 io_thread_globals->cert_transparency_verifier.get());
487 main_context->set_http_auth_handler_factory( 503 main_context->set_http_auth_handler_factory(
488 io_thread_globals->http_auth_handler_factory.get()); 504 io_thread_globals->http_auth_handler_factory.get());
489 505
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 request_interceptors.insert( 595 request_interceptors.insert(
580 request_interceptors.begin(), 596 request_interceptors.begin(),
581 new data_reduction_proxy::DataReductionProxyInterceptor( 597 new data_reduction_proxy::DataReductionProxyInterceptor(
582 data_reduction_proxy_params(), 598 data_reduction_proxy_params(),
583 data_reduction_proxy_usage_stats(), 599 data_reduction_proxy_usage_stats(),
584 data_reduction_proxy_event_store())); 600 data_reduction_proxy_event_store()));
585 main_job_factory_ = SetUpJobFactoryDefaults( 601 main_job_factory_ = SetUpJobFactoryDefaults(
586 main_job_factory.Pass(), 602 main_job_factory.Pass(),
587 request_interceptors.Pass(), 603 request_interceptors.Pass(),
588 profile_params->protocol_handler_interceptor.Pass(), 604 profile_params->protocol_handler_interceptor.Pass(),
589 network_delegate(), 605 main_context->network_delegate(),
590 ftp_factory_.get()); 606 ftp_factory_.get());
591 main_context->set_job_factory(main_job_factory_.get()); 607 main_context->set_job_factory(main_job_factory_.get());
592 608
593 #if defined(ENABLE_EXTENSIONS) 609 #if defined(ENABLE_EXTENSIONS)
594 InitializeExtensionsRequestContext(profile_params); 610 InitializeExtensionsRequestContext(profile_params);
595 #endif 611 #endif
596 612
597 // Setup SDCH for this profile. 613 // Setup SDCH for this profile.
598 sdch_manager_.reset(new net::SdchManager); 614 sdch_manager_.reset(new net::SdchManager);
599 sdch_policy_.reset(new ChromeSdchPolicy(sdch_manager_.get(), main_context)); 615 sdch_policy_.reset(new ChromeSdchPolicy(sdch_manager_.get(), main_context));
600 main_context->set_sdch_manager(sdch_manager_.get()); 616 main_context->set_sdch_manager(sdch_manager_.get());
601 617
602 // Create a media request context based on the main context, but using a 618 // Create a media request context based on the main context, but using a
603 // media cache. It shares the same job factory as the main context. 619 // media cache. It shares the same job factory as the main context.
604 StoragePartitionDescriptor details(profile_path_, false); 620 StoragePartitionDescriptor details(profile_path_, false);
605 media_request_context_.reset(InitializeMediaRequestContext(main_context, 621 media_request_context_.reset(InitializeMediaRequestContext(main_context,
606 details)); 622 details));
607 623
608 if (domain_reliability_monitor_) {
609 domain_reliability::DomainReliabilityMonitor* monitor =
610 domain_reliability_monitor_.get();
611 monitor->InitURLRequestContext(main_context);
612 monitor->AddBakedInConfigs();
613 monitor->SetDiscardUploads(!GetMetricsEnabledStateOnIOThread());
614 network_delegate()->set_domain_reliability_monitor(monitor);
615 }
616
617 lazy_params_.reset(); 624 lazy_params_.reset();
618 } 625 }
619 626
620 void ProfileImplIOData:: 627 void ProfileImplIOData::
621 InitializeExtensionsRequestContext(ProfileParams* profile_params) const { 628 InitializeExtensionsRequestContext(ProfileParams* profile_params) const {
622 net::URLRequestContext* extensions_context = extensions_request_context(); 629 net::URLRequestContext* extensions_context = extensions_request_context();
623 IOThread* const io_thread = profile_params->io_thread; 630 IOThread* const io_thread = profile_params->io_thread;
624 IOThread::Globals* const io_thread_globals = io_thread->globals(); 631 IOThread::Globals* const io_thread_globals = io_thread->globals();
625 ApplyProfileParamsToContext(extensions_context); 632 ApplyProfileParamsToContext(extensions_context);
626 633
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 request_interceptors.insert( 747 request_interceptors.insert(
741 request_interceptors.begin(), 748 request_interceptors.begin(),
742 new data_reduction_proxy::DataReductionProxyInterceptor( 749 new data_reduction_proxy::DataReductionProxyInterceptor(
743 data_reduction_proxy_params(), 750 data_reduction_proxy_params(),
744 data_reduction_proxy_usage_stats(), 751 data_reduction_proxy_usage_stats(),
745 data_reduction_proxy_event_store())); 752 data_reduction_proxy_event_store()));
746 scoped_ptr<net::URLRequestJobFactory> top_job_factory( 753 scoped_ptr<net::URLRequestJobFactory> top_job_factory(
747 SetUpJobFactoryDefaults(job_factory.Pass(), 754 SetUpJobFactoryDefaults(job_factory.Pass(),
748 request_interceptors.Pass(), 755 request_interceptors.Pass(),
749 protocol_handler_interceptor.Pass(), 756 protocol_handler_interceptor.Pass(),
750 network_delegate(), 757 main_context->network_delegate(),
751 ftp_factory_.get())); 758 ftp_factory_.get()));
752 context->SetJobFactory(top_job_factory.Pass()); 759 context->SetJobFactory(top_job_factory.Pass());
753 760
754 return context; 761 return context;
755 } 762 }
756 763
757 net::URLRequestContext* 764 net::URLRequestContext*
758 ProfileImplIOData::InitializeMediaRequestContext( 765 ProfileImplIOData::InitializeMediaRequestContext(
759 net::URLRequestContext* original_context, 766 net::URLRequestContext* original_context,
760 const StoragePartitionDescriptor& partition_descriptor) const { 767 const StoragePartitionDescriptor& partition_descriptor) const {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 853 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
847 DCHECK(initialized()); 854 DCHECK(initialized());
848 855
849 DCHECK(transport_security_state()); 856 DCHECK(transport_security_state());
850 // Completes synchronously. 857 // Completes synchronously.
851 transport_security_state()->DeleteAllDynamicDataSince(time); 858 transport_security_state()->DeleteAllDynamicDataSince(time);
852 DCHECK(http_server_properties_manager_); 859 DCHECK(http_server_properties_manager_);
853 http_server_properties_manager_->Clear(completion); 860 http_server_properties_manager_->Clear(completion);
854 } 861 }
855 862
856 bool ProfileImplIOData::IsDataReductionProxyEnabled() const { 863 bool ProfileImplIOData::IsDataReductionProxyEnabled() const {
mmenke 2014/12/04 19:20:07 Is this called from anywhere? If so, fine to keep
megjablon 2014/12/04 20:31:00 Used here https://code.google.com/p/chromium/codes
857 return data_reduction_proxy_enabled_.GetValue() || 864 return data_reduction_proxy_enabled_io_.GetValue() ||
858 CommandLine::ForCurrentProcess()->HasSwitch( 865 CommandLine::ForCurrentProcess()->HasSwitch(
859 data_reduction_proxy::switches::kEnableDataReductionProxy); 866 data_reduction_proxy::switches::kEnableDataReductionProxy);
860 } 867 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl_io_data.h ('k') | chrome/browser/profiles/profile_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698