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

Side by Side Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc

Issue 596053003: Add client type in chrome-proxy header for desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@extension
Patch Set: Remove unnecessary const keyword. 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 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 "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" 10 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
11 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator. h" 11 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator. h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_requ est_handler.h" 14 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_requ est_handler.h"
15 #include "components/data_reduction_proxy/browser/data_reduction_proxy_configura tor.h" 15 #include "components/data_reduction_proxy/browser/data_reduction_proxy_configura tor.h"
16 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" 16 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h"
17 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings. h" 17 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings. h"
18 #include "net/url_request/url_request_context_getter.h" 18 #include "net/url_request/url_request_context_getter.h"
19 19
20 using data_reduction_proxy::Client;
20 using data_reduction_proxy::DataReductionProxyParams; 21 using data_reduction_proxy::DataReductionProxyParams;
21 using data_reduction_proxy::DataReductionProxySettings; 22 using data_reduction_proxy::DataReductionProxySettings;
22 23
23 DataReductionProxyChromeSettings::DataReductionProxyChromeSettings( 24 DataReductionProxyChromeSettings::DataReductionProxyChromeSettings(
24 DataReductionProxyParams* params) : DataReductionProxySettings(params) { 25 DataReductionProxyParams* params) : DataReductionProxySettings(params) {
25 } 26 }
26 27
27 DataReductionProxyChromeSettings::~DataReductionProxyChromeSettings() { 28 DataReductionProxyChromeSettings::~DataReductionProxyChromeSettings() {
28 } 29 }
29 30
(...skipping 14 matching lines...) Expand all
44 } 45 }
45 46
46 void DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial( 47 void DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial(
47 bool data_reduction_proxy_enabled) { 48 bool data_reduction_proxy_enabled) {
48 ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial( 49 ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial(
49 "DataReductionProxyEnabled", 50 "DataReductionProxyEnabled",
50 data_reduction_proxy_enabled ? "true" : "false"); 51 data_reduction_proxy_enabled ? "true" : "false");
51 } 52 }
52 53
53 // static 54 // static
54 std::string DataReductionProxyChromeSettings::GetClient() { 55 Client DataReductionProxyChromeSettings::GetClient() {
55 #if defined(OS_ANDROID) 56 #if defined(OS_ANDROID)
56 return data_reduction_proxy::kClientChromeAndroid; 57 return Client::CHROME_ANDROID;
57 #elif defined(OS_IOS) 58 #elif defined(OS_IOS)
58 return data_reduction_proxy::kClientChromeIOS; 59 return Client::CHROME_IOS;
60 #elif defined(OS_MACOSX)
61 return Client::CHROME_MAC;
62 #elif defined(OS_CHROMEOS)
63 return Client::CHROME_CHROMEOS;
64 #elif defined(OS_LINUX)
65 return Client::CHROME_LINUX;
66 #elif defined(OS_WIN)
67 return Client::CHROME_WINDOWS;
68 #elif defined(OS_FREEBSD)
69 return Client::CHROME_FREEBSD;
70 #elif defined(OS_OPENBSD)
71 return Client::CHROME_OPENBSD;
72 #elif defined(OS_SOLARIS)
73 return Client::CHROME_SOLARIS;
74 #elif defined(OS_QNX)
75 return Client::CHROME_QNX;
59 #else 76 #else
60 return ""; 77 return Client::UNKNOWN;
61 #endif 78 #endif
62 } 79 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698