OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.h" | 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett
ings.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/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/prefs/pref_member.h" | 10 #include "base/prefs/pref_member.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // Prevent configuring the proxy when it is not allowed to be used. | 136 // Prevent configuring the proxy when it is not allowed to be used. |
137 if (!allowed_) | 137 if (!allowed_) |
138 return; | 138 return; |
139 | 139 |
140 if (spdy_proxy_auth_enabled_.GetValue() != enabled) { | 140 if (spdy_proxy_auth_enabled_.GetValue() != enabled) { |
141 spdy_proxy_auth_enabled_.SetValue(enabled); | 141 spdy_proxy_auth_enabled_.SetValue(enabled); |
142 OnProxyEnabledPrefChange(); | 142 OnProxyEnabledPrefChange(); |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 int64 DataReductionProxySettings::GetDataReductionLastUpdateTime() { | 146 int64_t DataReductionProxySettings::GetDataReductionLastUpdateTime() { |
147 DCHECK(thread_checker_.CalledOnValidThread()); | 147 DCHECK(thread_checker_.CalledOnValidThread()); |
148 DCHECK(data_reduction_proxy_service_->compression_stats()); | 148 DCHECK(data_reduction_proxy_service_->compression_stats()); |
149 return | 149 return |
150 data_reduction_proxy_service_->compression_stats()->GetLastUpdateTime(); | 150 data_reduction_proxy_service_->compression_stats()->GetLastUpdateTime(); |
151 } | 151 } |
152 | 152 |
153 void DataReductionProxySettings::SetUnreachable(bool unreachable) { | 153 void DataReductionProxySettings::SetUnreachable(bool unreachable) { |
154 unreachable_ = unreachable; | 154 unreachable_ = unreachable; |
155 } | 155 } |
156 | 156 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 ContentLengthList | 359 ContentLengthList |
360 DataReductionProxySettings::GetDailyContentLengths(const char* pref_name) { | 360 DataReductionProxySettings::GetDailyContentLengths(const char* pref_name) { |
361 DCHECK(thread_checker_.CalledOnValidThread()); | 361 DCHECK(thread_checker_.CalledOnValidThread()); |
362 DCHECK(data_reduction_proxy_service_->compression_stats()); | 362 DCHECK(data_reduction_proxy_service_->compression_stats()); |
363 return data_reduction_proxy_service_->compression_stats()-> | 363 return data_reduction_proxy_service_->compression_stats()-> |
364 GetDailyContentLengths(pref_name); | 364 GetDailyContentLengths(pref_name); |
365 } | 365 } |
366 | 366 |
367 void DataReductionProxySettings::GetContentLengths( | 367 void DataReductionProxySettings::GetContentLengths( |
368 unsigned int days, | 368 unsigned int days, |
369 int64* original_content_length, | 369 int64_t* original_content_length, |
370 int64* received_content_length, | 370 int64_t* received_content_length, |
371 int64* last_update_time) { | 371 int64_t* last_update_time) { |
372 DCHECK(thread_checker_.CalledOnValidThread()); | 372 DCHECK(thread_checker_.CalledOnValidThread()); |
373 DCHECK(data_reduction_proxy_service_->compression_stats()); | 373 DCHECK(data_reduction_proxy_service_->compression_stats()); |
374 | 374 |
375 data_reduction_proxy_service_->compression_stats()->GetContentLengths( | 375 data_reduction_proxy_service_->compression_stats()->GetContentLengths( |
376 days, original_content_length, received_content_length, last_update_time); | 376 days, original_content_length, received_content_length, last_update_time); |
377 } | 377 } |
378 | 378 |
379 } // namespace data_reduction_proxy | 379 } // namespace data_reduction_proxy |
OLD | NEW |