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

Side by Side Diff: content/browser/renderer_host/buffered_resource_handler.cc

Issue 10644011: Revert r143458 (which re-applies r143341 and r142979). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
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 "content/browser/renderer_host/buffered_resource_handler.h" 5 #include "content/browser/renderer_host/buffered_resource_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 bool* defer) { 376 bool* defer) {
377 // Inform the original ResourceHandler that this will be handled entirely by 377 // Inform the original ResourceHandler that this will be handled entirely by
378 // the new ResourceHandler. 378 // the new ResourceHandler.
379 // TODO(darin): We should probably check the return values of these. 379 // TODO(darin): We should probably check the return values of these.
380 bool defer_ignored = false; 380 bool defer_ignored = false;
381 next_handler_->OnResponseStarted(request_id, response_, &defer_ignored); 381 next_handler_->OnResponseStarted(request_id, response_, &defer_ignored);
382 DCHECK(!defer_ignored); 382 DCHECK(!defer_ignored);
383 net::URLRequestStatus status(net::URLRequestStatus::HANDLED_EXTERNALLY, 0); 383 net::URLRequestStatus status(net::URLRequestStatus::HANDLED_EXTERNALLY, 0);
384 next_handler_->OnResponseCompleted(request_id, status, std::string()); 384 next_handler_->OnResponseCompleted(request_id, status, std::string());
385 385
386 // Remove the non-owning pointer to the CrossSiteResourceHandler, if any,
387 // from the extra request info because the CrossSiteResourceHandler (part of
388 // the original ResourceHandler chain) will be deleted by the next statement.
389 ResourceRequestInfoImpl* info =
390 ResourceRequestInfoImpl::ForRequest(request_);
391 info->set_cross_site_handler(NULL);
392
393 // This is handled entirely within the new ResourceHandler, so just reset the 386 // This is handled entirely within the new ResourceHandler, so just reset the
394 // original ResourceHandler. 387 // original ResourceHandler.
395 next_handler_ = handler.Pass(); 388 next_handler_ = handler.Pass();
396 next_handler_->SetController(controller()); 389 next_handler_->SetController(controller());
397 390
398 next_handler_needs_response_started_ = true; 391 next_handler_needs_response_started_ = true;
399 next_handler_needs_will_read_ = true; 392 next_handler_needs_will_read_ = true;
400 393
401 return ForwardPendingEventsToNextHandler(request_id, defer); 394 return ForwardPendingEventsToNextHandler(request_id, defer);
402 } 395 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 440
448 bool defer = false; 441 bool defer = false;
449 if (!CompleteResponseStarted(request_id, &defer)) { 442 if (!CompleteResponseStarted(request_id, &defer)) {
450 controller()->Cancel(); 443 controller()->Cancel();
451 } else if (!defer && needs_resume) { 444 } else if (!defer && needs_resume) {
452 controller()->Resume(); 445 controller()->Resume();
453 } 446 }
454 } 447 }
455 448
456 } // namespace content 449 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698