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

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

Issue 791493015: Adding q=low to the Chrome-Proxy request header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 "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 "base/prefs/scoped_user_pref_update.h" 9 #include "base/prefs/scoped_user_pref_update.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" 11 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
12 #include "chrome/browser/prefs/proxy_prefs.h" 12 #include "chrome/browser/prefs/proxy_prefs.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/profiles/profile_manager.h" 14 #include "chrome/browser/profiles/profile_manager.h"
15 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
16 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth _request_handler.h"
17 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf igurator.h" 16 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf igurator.h"
18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d ata.h" 17 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d ata.h"
19 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h" 18 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h"
20 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h" 19 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param s.h"
21 #include "net/url_request/url_request_context_getter.h" 20 #include "net/url_request/url_request_context_getter.h"
22 21
23 using data_reduction_proxy::Client; 22 using data_reduction_proxy::Client;
24 using data_reduction_proxy::DataReductionProxyParams; 23 using data_reduction_proxy::DataReductionProxyParams;
25 using data_reduction_proxy::DataReductionProxySettings; 24 using data_reduction_proxy::DataReductionProxySettings;
26 25
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 78 }
80 79
81 void DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial( 80 void DataReductionProxyChromeSettings::RegisterSyntheticFieldTrial(
82 bool data_reduction_proxy_enabled) { 81 bool data_reduction_proxy_enabled) {
83 ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial( 82 ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial(
84 "DataReductionProxyEnabled", 83 "DataReductionProxyEnabled",
85 data_reduction_proxy_enabled ? "true" : "false"); 84 data_reduction_proxy_enabled ? "true" : "false");
86 } 85 }
87 86
88 // static 87 // static
89 Client DataReductionProxyChromeSettings::GetClient() { 88 Client DataReductionProxyChromeSettings::GetClient() {
bengr 2015/01/27 18:54:59 This requires the #include you removed, afaik.
megjablon 2015/01/27 23:44:12 data_reduction_proxy_chrome_settings.h includes it
90 #if defined(OS_ANDROID) 89 #if defined(OS_ANDROID)
91 return Client::CHROME_ANDROID; 90 return Client::CHROME_ANDROID;
92 #elif defined(OS_IOS) 91 #elif defined(OS_IOS)
93 return Client::CHROME_IOS; 92 return Client::CHROME_IOS;
94 #elif defined(OS_MACOSX) 93 #elif defined(OS_MACOSX)
95 return Client::CHROME_MAC; 94 return Client::CHROME_MAC;
96 #elif defined(OS_CHROMEOS) 95 #elif defined(OS_CHROMEOS)
97 return Client::CHROME_CHROMEOS; 96 return Client::CHROME_CHROMEOS;
98 #elif defined(OS_LINUX) 97 #elif defined(OS_LINUX)
99 return Client::CHROME_LINUX; 98 return Client::CHROME_LINUX;
100 #elif defined(OS_WIN) 99 #elif defined(OS_WIN)
101 return Client::CHROME_WINDOWS; 100 return Client::CHROME_WINDOWS;
102 #elif defined(OS_FREEBSD) 101 #elif defined(OS_FREEBSD)
103 return Client::CHROME_FREEBSD; 102 return Client::CHROME_FREEBSD;
104 #elif defined(OS_OPENBSD) 103 #elif defined(OS_OPENBSD)
105 return Client::CHROME_OPENBSD; 104 return Client::CHROME_OPENBSD;
106 #elif defined(OS_SOLARIS) 105 #elif defined(OS_SOLARIS)
107 return Client::CHROME_SOLARIS; 106 return Client::CHROME_SOLARIS;
108 #elif defined(OS_QNX) 107 #elif defined(OS_QNX)
109 return Client::CHROME_QNX; 108 return Client::CHROME_QNX;
110 #else 109 #else
111 return Client::UNKNOWN; 110 return Client::UNKNOWN;
112 #endif 111 #endif
113 } 112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698