OLD | NEW |
---|---|
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_params.h" | 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_params.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/metrics/field_trial.h" | 11 #include "base/metrics/field_trial.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "components/data_reduction_proxy/common/data_reduction_proxy_switches.h " | 13 #include "components/data_reduction_proxy/common/data_reduction_proxy_switches.h " |
14 #include "net/base/host_port_pair.h" | 14 #include "net/base/host_port_pair.h" |
15 #include "net/proxy/proxy_config.h" | 15 #include "net/proxy/proxy_config.h" |
16 #include "net/proxy/proxy_info.h" | 16 #include "net/proxy/proxy_info.h" |
17 #include "net/proxy/proxy_retry_info.h" | 17 #include "net/proxy/proxy_retry_info.h" |
18 #include "net/proxy/proxy_server.h" | 18 #include "net/proxy/proxy_server.h" |
19 #include "net/proxy/proxy_service.h" | 19 #include "net/proxy/proxy_service.h" |
20 #include "net/url_request/url_request.h" | 20 #include "net/url_request/url_request.h" |
21 #include "net/url_request/url_request_context.h" | 21 #include "net/url_request/url_request_context.h" |
22 #include "url/url_constants.h" | 22 #include "url/url_constants.h" |
23 | 23 |
24 using base::FieldTrialList; | 24 using base::FieldTrialList; |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 const char kEnabled[] = "Enabled"; | 28 const char kEnabled[] = "Enabled"; |
29 const char kDefaultOrigin[] = "https://proxy.googlezip.net:443/"; | 29 const char kDefaultOrigin[] = "https://proxy.googlezip.net:443/"; |
30 const char kDevOrigin[] = "http://proxy-dev.googlezip.net:443/"; | 30 const char kDevOrigin[] = "https://proxy-dev.googlezip.net:443/"; |
31 const char kDevFallbackOrigin[] = "http://proxy-dev.googlezip.net:80/"; | 31 const char kDevFallbackOrigin[] = "http://proxy-dev.googlezip.net:80/"; |
32 const char kDefaultFallbackOrigin[] = "http://compress.googlezip.net:80/"; | 32 const char kDefaultFallbackOrigin[] = "http://compress.googlezip.net:80/"; |
33 const char kDefaultSslOrigin[] = "http://ssl.googlezip.net:1043/"; | 33 const char kDefaultSslOrigin[] = "http://ssl.googlezip.net:443/"; |
bengr
2014/09/26 18:26:26
Please add a comment about this one that says:
//
Not at Google. Contact bengr
2014/09/26 18:28:53
Done.
| |
34 const char kDefaultAltOrigin[] = "https://proxy.googlezip.net:443/"; | 34 const char kDefaultAltOrigin[] = "http://ssl.googlezip.net:80/"; |
35 const char kDefaultAltFallbackOrigin[] = "http://compress.googlezip.net:80/"; | 35 const char kDefaultAltFallbackOrigin[] = "http://ssl.googlezip.net:80/"; |
36 const char kDefaultProbeUrl[] = "http://check.googlezip.net/connect"; | 36 const char kDefaultProbeUrl[] = "http://check.googlezip.net/connect"; |
37 const char kDefaultWarmupUrl[] = "http://www.gstatic.com/generate_204"; | 37 const char kDefaultWarmupUrl[] = "http://www.gstatic.com/generate_204"; |
38 | 38 |
39 } // namespace | 39 } // namespace |
40 | 40 |
41 namespace data_reduction_proxy { | 41 namespace data_reduction_proxy { |
42 | 42 |
43 // static | 43 // static |
44 bool DataReductionProxyParams::IsIncludedInAlternativeFieldTrial() { | 44 bool DataReductionProxyParams::IsIncludedInAlternativeFieldTrial() { |
45 const std::string group_name = base::FieldTrialList::FindFullName( | 45 const std::string group_name = base::FieldTrialList::FindFullName( |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
508 | 508 |
509 std::string DataReductionProxyParams::GetDefaultProbeURL() const { | 509 std::string DataReductionProxyParams::GetDefaultProbeURL() const { |
510 return kDefaultProbeUrl; | 510 return kDefaultProbeUrl; |
511 } | 511 } |
512 | 512 |
513 std::string DataReductionProxyParams::GetDefaultWarmupURL() const { | 513 std::string DataReductionProxyParams::GetDefaultWarmupURL() const { |
514 return kDefaultWarmupUrl; | 514 return kDefaultWarmupUrl; |
515 } | 515 } |
516 | 516 |
517 } // namespace data_reduction_proxy | 517 } // namespace data_reduction_proxy |
OLD | NEW |