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

Side by Side Diff: content/browser/loader/intercepting_resource_handler.cc

Issue 2366753002: Have MimeSniffingResourceHandler call WillStartRequest on new Handlers. (Closed)
Patch Set: Fix Created 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/browser/loader/intercepting_resource_handler.h" 5 #include "content/browser/loader/intercepting_resource_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "content/public/common/resource_response.h" 9 #include "content/public/common/resource_response.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
11 #include "net/url_request/url_request.h"
11 12
12 namespace content { 13 namespace content {
13 14
14 InterceptingResourceHandler::InterceptingResourceHandler( 15 InterceptingResourceHandler::InterceptingResourceHandler(
15 std::unique_ptr<ResourceHandler> next_handler, 16 std::unique_ptr<ResourceHandler> next_handler,
16 net::URLRequest* request) 17 net::URLRequest* request)
17 : LayeredResourceHandler(request, std::move(next_handler)), 18 : LayeredResourceHandler(request, std::move(next_handler)),
18 state_(State::STARTING), 19 state_(State::STARTING),
19 first_read_buffer_size_(0) {} 20 first_read_buffer_size_(0) {}
20 21
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 payload_for_old_handler_ = std::string(); 155 payload_for_old_handler_ = std::string();
155 DCHECK(!defer_ignored); 156 DCHECK(!defer_ignored);
156 157
157 // Finalize the request. 158 // Finalize the request.
158 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0); 159 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
159 next_handler_->OnResponseCompleted(status, &defer_ignored); 160 next_handler_->OnResponseCompleted(status, &defer_ignored);
160 DCHECK(!defer_ignored); 161 DCHECK(!defer_ignored);
161 } 162 }
162 163
163 } // namespace content 164 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/intercepting_resource_handler.h ('k') | content/browser/loader/mime_sniffing_resource_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698