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

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

Issue 1662843002: Revert of Delete base/prefs and update callers to use components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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_comp ression_stats.h" 5 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp ression_stats.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/metrics/histogram_macros.h" 15 #include "base/metrics/histogram_macros.h"
16 #include "base/prefs/pref_service.h"
17 #include "base/prefs/scoped_user_pref_update.h"
16 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
17 #include "base/trace_event/trace_event.h" 19 #include "base/trace_event/trace_event.h"
18 #include "base/values.h" 20 #include "base/values.h"
19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metr ics.h" 21 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metr ics.h"
20 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice.h" 22 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_serv ice.h"
21 #include "components/data_reduction_proxy/core/browser/data_usage_store.h" 23 #include "components/data_reduction_proxy/core/browser/data_usage_store.h"
22 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h" 24 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_pref_ names.h"
23 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc hes.h" 25 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc hes.h"
24 #include "components/prefs/pref_service.h"
25 #include "components/prefs/scoped_user_pref_update.h"
26 #include "net/base/mime_util.h" 26 #include "net/base/mime_util.h"
27 27
28 namespace data_reduction_proxy { 28 namespace data_reduction_proxy {
29 29
30 namespace { 30 namespace {
31 31
32 #define CONCAT(a, b) a##b 32 #define CONCAT(a, b) a##b
33 // CONCAT1 provides extra level of indirection so that __LINE__ macro expands. 33 // CONCAT1 provides extra level of indirection so that __LINE__ macro expands.
34 #define CONCAT1(a, b) CONCAT(a, b) 34 #define CONCAT1(a, b) CONCAT(a, b)
35 #define UNIQUE_VARNAME CONCAT1(var_, __LINE__) 35 #define UNIQUE_VARNAME CONCAT1(var_, __LINE__)
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 std::string DataReductionProxyCompressionStats::NormalizeHostname( 1204 std::string DataReductionProxyCompressionStats::NormalizeHostname(
1205 const std::string& host) { 1205 const std::string& host) {
1206 size_t pos = host.find("://"); 1206 size_t pos = host.find("://");
1207 if (pos != std::string::npos) 1207 if (pos != std::string::npos)
1208 return host.substr(pos + 3); 1208 return host.substr(pos + 3);
1209 1209
1210 return host; 1210 return host;
1211 } 1211 }
1212 1212
1213 } // namespace data_reduction_proxy 1213 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698