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

Side by Side Diff: components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.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: 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 "components/data_reduction_proxy/browser/data_reduction_proxy_auth_requ est_handler.h" 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_requ est_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 17 matching lines...) Expand all
28 // The empty version for the authentication protocol. Currently used by 28 // The empty version for the authentication protocol. Currently used by
29 // Android webview. 29 // Android webview.
30 #if defined(OS_ANDROID) 30 #if defined(OS_ANDROID)
31 const char kAndroidWebViewProtocolVersion[] = ""; 31 const char kAndroidWebViewProtocolVersion[] = "";
32 #endif 32 #endif
33 33
34 // The clients supported by the data reduction proxy. 34 // The clients supported by the data reduction proxy.
35 const char kClientAndroidWebview[] = "webview"; 35 const char kClientAndroidWebview[] = "webview";
36 const char kClientChromeAndroid[] = "android"; 36 const char kClientChromeAndroid[] = "android";
37 const char kClientChromeIOS[] = "ios"; 37 const char kClientChromeIOS[] = "ios";
38 const char kClientMac[] = "mac";
39 const char kClientLinux[] = "linux";
40 const char kClientWindows[] = "win";
41 const char kClientFreeBsd[] = "freebsd";
42 const char kClientOpenBsd[] = "openbsd";
43 const char kClientSolaris[] = "solaris";
44 const char kClientQnx[] = "qnx";
bengr 2014/09/23 20:18:50 Please add chromeos while you're at it.
Not at Google. Contact bengr 2014/09/29 23:47:18 Done.
38 45
39 // static 46 // static
40 bool DataReductionProxyAuthRequestHandler::IsKeySetOnCommandLine() { 47 bool DataReductionProxyAuthRequestHandler::IsKeySetOnCommandLine() {
41 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 48 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
42 return command_line.HasSwitch( 49 return command_line.HasSwitch(
43 data_reduction_proxy::switches::kDataReductionProxyKey); 50 data_reduction_proxy::switches::kDataReductionProxyKey);
44 } 51 }
45 52
46 DataReductionProxyAuthRequestHandler::DataReductionProxyAuthRequestHandler( 53 DataReductionProxyAuthRequestHandler::DataReductionProxyAuthRequestHandler(
47 const std::string& client, 54 const std::string& client,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 if (data_reduction_proxy_params_ && 233 if (data_reduction_proxy_params_ &&
227 data_reduction_proxy_params_->IsDataReductionProxy(proxy_server, NULL) && 234 data_reduction_proxy_params_->IsDataReductionProxy(proxy_server, NULL) &&
228 net::HostPortPair::FromURL( 235 net::HostPortPair::FromURL(
229 data_reduction_proxy_params_->ssl_origin()).Equals( 236 data_reduction_proxy_params_->ssl_origin()).Equals(
230 proxy_server) == expect_ssl) { 237 proxy_server) == expect_ssl) {
231 AddAuthorizationHeader(request_headers); 238 AddAuthorizationHeader(request_headers);
232 } 239 }
233 } 240 }
234 241
235 } // namespace data_reduction_proxy 242 } // namespace data_reduction_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698