| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/url_request/url_request_http_job.h" | 5 #include "net/url_request/url_request_http_job.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 advertise_sdch = false; | 616 advertise_sdch = false; |
| 617 } else { | 617 } else { |
| 618 sdch_test_activated_ = true; | 618 sdch_test_activated_ = true; |
| 619 } | 619 } |
| 620 } | 620 } |
| 621 | 621 |
| 622 // Advertise "br" encoding only if transferred data is opaque to proxy. | 622 // Advertise "br" encoding only if transferred data is opaque to proxy. |
| 623 bool advertise_brotli = false; | 623 bool advertise_brotli = false; |
| 624 if (request()->context()->enable_brotli()) { | 624 if (request()->context()->enable_brotli()) { |
| 625 if (request()->url().SchemeIsCryptographic() || | 625 if (request()->url().SchemeIsCryptographic() || |
| 626 IsLocalhost(request()->url().HostNoBrackets())) { | 626 IsLocalhost(request()->url().HostNoBracketsPiece())) { |
| 627 advertise_brotli = true; | 627 advertise_brotli = true; |
| 628 } | 628 } |
| 629 } | 629 } |
| 630 | 630 |
| 631 // Supply Accept-Encoding headers first so that it is more likely that they | 631 // Supply Accept-Encoding headers first so that it is more likely that they |
| 632 // will be in the first transmitted packet. This can sometimes make it | 632 // will be in the first transmitted packet. This can sometimes make it |
| 633 // easier to filter and analyze the streams to assure that a proxy has not | 633 // easier to filter and analyze the streams to assure that a proxy has not |
| 634 // damaged these headers. Some proxies deliberately corrupt Accept-Encoding | 634 // damaged these headers. Some proxies deliberately corrupt Accept-Encoding |
| 635 // headers. | 635 // headers. |
| 636 std::string advertised_encodings = "gzip, deflate"; | 636 std::string advertised_encodings = "gzip, deflate"; |
| (...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 awaiting_callback_ = false; | 1576 awaiting_callback_ = false; |
| 1577 | 1577 |
| 1578 // Notify NetworkQualityEstimator. | 1578 // Notify NetworkQualityEstimator. |
| 1579 NetworkQualityEstimator* network_quality_estimator = | 1579 NetworkQualityEstimator* network_quality_estimator = |
| 1580 request()->context()->network_quality_estimator(); | 1580 request()->context()->network_quality_estimator(); |
| 1581 if (network_quality_estimator) | 1581 if (network_quality_estimator) |
| 1582 network_quality_estimator->NotifyURLRequestDestroyed(*request()); | 1582 network_quality_estimator->NotifyURLRequestDestroyed(*request()); |
| 1583 } | 1583 } |
| 1584 | 1584 |
| 1585 } // namespace net | 1585 } // namespace net |
| OLD | NEW |