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

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

Issue 643443002: Move data_reduction_proxy_enabled pref to profile_impl_io_data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor whitespace change Created 6 years, 2 months 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_io_data.h" 5 #include "chrome/browser/profiles/profile_io_data.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 bool ProfileIOData::GetMetricsEnabledStateOnIOThread() const { 857 bool ProfileIOData::GetMetricsEnabledStateOnIOThread() const {
858 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 858 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
859 #if defined(OS_CHROMEOS) 859 #if defined(OS_CHROMEOS)
860 return enable_metrics_; 860 return enable_metrics_;
861 #else 861 #else
862 return enable_metrics_.GetValue(); 862 return enable_metrics_.GetValue();
863 #endif // defined(OS_CHROMEOS) 863 #endif // defined(OS_CHROMEOS)
864 } 864 }
865 865
866 bool ProfileIOData::IsDataReductionProxyEnabled() const { 866 bool ProfileIOData::IsDataReductionProxyEnabled() const {
867 return data_reduction_proxy_enabled_.GetValue() || 867 return false;
868 CommandLine::ForCurrentProcess()->HasSwitch(
869 data_reduction_proxy::switches::kEnableDataReductionProxy);
870 } 868 }
871 869
872 base::WeakPtr<net::HttpServerProperties> 870 base::WeakPtr<net::HttpServerProperties>
873 ProfileIOData::http_server_properties() const { 871 ProfileIOData::http_server_properties() const {
874 return http_server_properties_->GetWeakPtr(); 872 return http_server_properties_->GetWeakPtr();
875 } 873 }
876 874
877 void ProfileIOData::set_http_server_properties( 875 void ProfileIOData::set_http_server_properties(
878 scoped_ptr<net::HttpServerProperties> http_server_properties) const { 876 scoped_ptr<net::HttpServerProperties> http_server_properties) const {
879 http_server_properties_ = http_server_properties.Pass(); 877 http_server_properties_ = http_server_properties.Pass();
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 profile_params_->extension_info_map.get()); 1014 profile_params_->extension_info_map.get());
1017 #endif 1015 #endif
1018 #if defined(ENABLE_CONFIGURATION_POLICY) 1016 #if defined(ENABLE_CONFIGURATION_POLICY)
1019 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get()); 1017 network_delegate->set_url_blacklist_manager(url_blacklist_manager_.get());
1020 #endif 1018 #endif
1021 network_delegate->set_profile(profile_params_->profile); 1019 network_delegate->set_profile(profile_params_->profile);
1022 network_delegate->set_profile_path(profile_params_->path); 1020 network_delegate->set_profile_path(profile_params_->path);
1023 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get()); 1021 network_delegate->set_cookie_settings(profile_params_->cookie_settings.get());
1024 network_delegate->set_enable_do_not_track(&enable_do_not_track_); 1022 network_delegate->set_enable_do_not_track(&enable_do_not_track_);
1025 network_delegate->set_force_google_safe_search(&force_safesearch_); 1023 network_delegate->set_force_google_safe_search(&force_safesearch_);
1026 network_delegate->set_data_reduction_proxy_enabled_pref(
1027 &data_reduction_proxy_enabled_);
1028 network_delegate->set_prerender_tracker(profile_params_->prerender_tracker); 1024 network_delegate->set_prerender_tracker(profile_params_->prerender_tracker);
1029 network_delegate_.reset(network_delegate); 1025 network_delegate_.reset(network_delegate);
1030 1026
1031 fraudulent_certificate_reporter_.reset( 1027 fraudulent_certificate_reporter_.reset(
1032 new chrome_browser_net::ChromeFraudulentCertificateReporter( 1028 new chrome_browser_net::ChromeFraudulentCertificateReporter(
1033 main_request_context_.get())); 1029 main_request_context_.get()));
1034 1030
1035 // NOTE: Proxy service uses the default io thread network delegate, not the 1031 // NOTE: Proxy service uses the default io thread network delegate, not the
1036 // delegate just created. 1032 // delegate just created.
1037 proxy_service_.reset( 1033 proxy_service_.reset(
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 google_services_username_pattern_.Destroy(); 1191 google_services_username_pattern_.Destroy();
1196 reverse_autologin_enabled_.Destroy(); 1192 reverse_autologin_enabled_.Destroy();
1197 one_click_signin_rejected_email_list_.Destroy(); 1193 one_click_signin_rejected_email_list_.Destroy();
1198 enable_referrers_.Destroy(); 1194 enable_referrers_.Destroy();
1199 enable_do_not_track_.Destroy(); 1195 enable_do_not_track_.Destroy();
1200 force_safesearch_.Destroy(); 1196 force_safesearch_.Destroy();
1201 #if !defined(OS_CHROMEOS) 1197 #if !defined(OS_CHROMEOS)
1202 enable_metrics_.Destroy(); 1198 enable_metrics_.Destroy();
1203 #endif 1199 #endif
1204 safe_browsing_enabled_.Destroy(); 1200 safe_browsing_enabled_.Destroy();
1205 data_reduction_proxy_enabled_.Destroy();
1206 printing_enabled_.Destroy(); 1201 printing_enabled_.Destroy();
1207 sync_disabled_.Destroy(); 1202 sync_disabled_.Destroy();
1208 signin_allowed_.Destroy(); 1203 signin_allowed_.Destroy();
1209 network_prediction_options_.Destroy(); 1204 network_prediction_options_.Destroy();
1210 quick_check_enabled_.Destroy(); 1205 quick_check_enabled_.Destroy();
1211 if (media_device_id_salt_.get()) 1206 if (media_device_id_salt_.get())
1212 media_device_id_salt_->ShutdownOnUIThread(); 1207 media_device_id_salt_->ShutdownOnUIThread();
1213 session_startup_pref_.Destroy(); 1208 session_startup_pref_.Destroy();
1214 #if defined(ENABLE_CONFIGURATION_POLICY) 1209 #if defined(ENABLE_CONFIGURATION_POLICY)
1215 if (url_blacklist_manager_) 1210 if (url_blacklist_manager_)
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 void ProfileIOData::SetCookieSettingsForTesting( 1280 void ProfileIOData::SetCookieSettingsForTesting(
1286 CookieSettings* cookie_settings) { 1281 CookieSettings* cookie_settings) {
1287 DCHECK(!cookie_settings_.get()); 1282 DCHECK(!cookie_settings_.get());
1288 cookie_settings_ = cookie_settings; 1283 cookie_settings_ = cookie_settings;
1289 } 1284 }
1290 1285
1291 void ProfileIOData::set_signin_names_for_testing( 1286 void ProfileIOData::set_signin_names_for_testing(
1292 SigninNamesOnIOThread* signin_names) { 1287 SigninNamesOnIOThread* signin_names) {
1293 signin_names_.reset(signin_names); 1288 signin_names_.reset(signin_names);
1294 } 1289 }
OLDNEW
« chrome/browser/profiles/profile_impl_io_data.cc ('K') | « chrome/browser/profiles/profile_io_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698