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

Side by Side Diff: net/url_request/url_request_http_job.cc

Issue 2753453003: Reject unadvertised encodings (Closed)
Patch Set: Reject unadvertised encodings. Created 3 years, 9 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 (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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 } 1112 }
1113 break; 1113 break;
1114 } 1114 }
1115 case SourceStream::TYPE_GZIP: 1115 case SourceStream::TYPE_GZIP:
1116 case SourceStream::TYPE_DEFLATE: 1116 case SourceStream::TYPE_DEFLATE:
1117 case SourceStream::TYPE_GZIP_FALLBACK: 1117 case SourceStream::TYPE_GZIP_FALLBACK:
1118 downstream = GzipSourceStream::Create(std::move(upstream), type); 1118 downstream = GzipSourceStream::Create(std::move(upstream), type);
1119 break; 1119 break;
1120 case SourceStream::TYPE_NONE: 1120 case SourceStream::TYPE_NONE:
1121 case SourceStream::TYPE_INVALID: 1121 case SourceStream::TYPE_INVALID:
1122 case SourceStream::TYPE_UNKNOWN:
1122 case SourceStream::TYPE_MAX: 1123 case SourceStream::TYPE_MAX:
1123 NOTREACHED(); 1124 NOTREACHED();
1124 return nullptr; 1125 return nullptr;
1125 } 1126 }
1126 if (downstream == nullptr) 1127 if (downstream == nullptr)
1127 return nullptr; 1128 return nullptr;
1128 upstream = std::move(downstream); 1129 upstream = std::move(downstream);
1129 } 1130 }
1130 1131
1131 return upstream; 1132 return upstream;
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 awaiting_callback_ = false; 1552 awaiting_callback_ = false;
1552 1553
1553 // Notify NetworkQualityEstimator. 1554 // Notify NetworkQualityEstimator.
1554 NetworkQualityEstimator* network_quality_estimator = 1555 NetworkQualityEstimator* network_quality_estimator =
1555 request()->context()->network_quality_estimator(); 1556 request()->context()->network_quality_estimator();
1556 if (network_quality_estimator) 1557 if (network_quality_estimator)
1557 network_quality_estimator->NotifyURLRequestDestroyed(*request()); 1558 network_quality_estimator->NotifyURLRequestDestroyed(*request());
1558 } 1559 }
1559 1560
1560 } // namespace net 1561 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698