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

Side by Side Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_experiments_stats.cc

Issue 1546143002: Switch to standard integer types in components/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_expe riments_stats.h" 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_expe riments_stats.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf ig_retrieval_params.h" 8 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf ig_retrieval_params.h"
9 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h" 9 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h"
10 10
(...skipping 28 matching lines...) Expand all
39 UpdateSimulatedConfig(); 39 UpdateSimulatedConfig();
40 config_refresh_time_.Start( 40 config_refresh_time_.Start(
41 FROM_HERE, config_retrieval_params_->refresh_interval(), this, 41 FROM_HERE, config_retrieval_params_->refresh_interval(), this,
42 &DataReductionProxyExperimentsStats::UpdateSimulatedConfig); 42 &DataReductionProxyExperimentsStats::UpdateSimulatedConfig);
43 } 43 }
44 } 44 }
45 45
46 void DataReductionProxyExperimentsStats::RecordBytes( 46 void DataReductionProxyExperimentsStats::RecordBytes(
47 const base::Time& request_time, 47 const base::Time& request_time,
48 DataReductionProxyRequestType request_type, 48 DataReductionProxyRequestType request_type,
49 int64 received_content_length, 49 int64_t received_content_length,
50 int64 original_content_length) { 50 int64_t original_content_length) {
51 DCHECK(thread_checker_.CalledOnValidThread()); 51 DCHECK(thread_checker_.CalledOnValidThread());
52 if (config_retrieval_params_) { 52 if (config_retrieval_params_) {
53 // Only measure requests which flowed through the Data Reduction Proxy. 53 // Only measure requests which flowed through the Data Reduction Proxy.
54 if (request_type == VIA_DATA_REDUCTION_PROXY) { 54 if (request_type == VIA_DATA_REDUCTION_PROXY) {
55 config_retrieval_params_->RecordStats( 55 config_retrieval_params_->RecordStats(
56 request_time, received_content_length, original_content_length); 56 request_time, received_content_length, original_content_length);
57 } 57 }
58 } 58 }
59 } 59 }
60 60
61 void DataReductionProxyExperimentsStats::UpdateSimulatedConfig() { 61 void DataReductionProxyExperimentsStats::UpdateSimulatedConfig() {
62 DCHECK(config_retrieval_params_); 62 DCHECK(config_retrieval_params_);
63 value_setter_.Run(prefs::kSimulatedConfigRetrieveTime, 63 value_setter_.Run(prefs::kSimulatedConfigRetrieveTime,
64 base::Time::Now().ToInternalValue()); 64 base::Time::Now().ToInternalValue());
65 } 65 }
66 66
67 } // namespace data_reduction_proxy 67 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698