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

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

Issue 10640019: Remove the HANDLED_EXTERNALLY status code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed some minor issues Created 8 years, 5 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 "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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 bool BufferedResourceHandler::UseAlternateResourceHandler( 373 bool BufferedResourceHandler::UseAlternateResourceHandler(
374 int request_id, 374 int request_id,
375 scoped_ptr<ResourceHandler> handler, 375 scoped_ptr<ResourceHandler> handler,
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::SUCCESS,
384 net::OK_HANDLED_EXTERNALLY);
384 next_handler_->OnResponseCompleted(request_id, status, std::string()); 385 next_handler_->OnResponseCompleted(request_id, status, std::string());
385 386
386 // This is handled entirely within the new ResourceHandler, so just reset the 387 // This is handled entirely within the new ResourceHandler, so just reset the
387 // original ResourceHandler. 388 // original ResourceHandler.
388 next_handler_ = handler.Pass(); 389 next_handler_ = handler.Pass();
389 next_handler_->SetController(controller()); 390 next_handler_->SetController(controller());
390 391
391 next_handler_needs_response_started_ = true; 392 next_handler_needs_response_started_ = true;
392 next_handler_needs_will_read_ = true; 393 next_handler_needs_will_read_ = true;
393 394
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 441
441 bool defer = false; 442 bool defer = false;
442 if (!CompleteResponseStarted(request_id, &defer)) { 443 if (!CompleteResponseStarted(request_id, &defer)) {
443 controller()->Cancel(); 444 controller()->Cancel();
444 } else if (!defer && needs_resume) { 445 } else if (!defer && needs_resume) {
445 controller()->Resume(); 446 controller()->Resume();
446 } 447 }
447 } 448 }
448 449
449 } // namespace content 450 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698