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

Side by Side Diff: components/previews/core/previews_data_savings.cc

Issue 2333003002: Changed previews component to be a layered component. (Closed)
Patch Set: Rebased on master Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/previews/previews_data_savings.h" 5 #include "components/previews/core/previews_data_savings.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "components/data_reduction_proxy/core/common/data_savings_recorder.h" 9 #include "components/data_reduction_proxy/core/common/data_savings_recorder.h"
10 10
11 namespace previews { 11 namespace previews {
12 12
13 PreviewsDataSavings::PreviewsDataSavings( 13 PreviewsDataSavings::PreviewsDataSavings(
14 data_reduction_proxy::DataSavingsRecorder* data_savings_recorder) 14 data_reduction_proxy::DataSavingsRecorder* data_savings_recorder)
15 : data_savings_recorder_(data_savings_recorder) { 15 : data_savings_recorder_(data_savings_recorder) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 (original_size - data_used) * 100 / original_size); 62 (original_size - data_used) * 100 / original_size);
63 } else { 63 } else {
64 UMA_HISTOGRAM_COUNTS("Previews.DataInflation.DataSaverEnabled", 64 UMA_HISTOGRAM_COUNTS("Previews.DataInflation.DataSaverEnabled",
65 (data_used - original_size) >> 10); 65 (data_used - original_size) >> 10);
66 UMA_HISTOGRAM_PERCENTAGE("Previews.DataInflationPercent.DataSaverEnabled", 66 UMA_HISTOGRAM_PERCENTAGE("Previews.DataInflationPercent.DataSaverEnabled",
67 (data_used - original_size) * 100 / data_used); 67 (data_used - original_size) * 100 / data_used);
68 } 68 }
69 } 69 }
70 70
71 } // namespace previews 71 } // namespace previews
OLDNEW
« no previous file with comments | « components/previews/core/previews_data_savings.h ('k') | components/previews/core/previews_data_savings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698