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

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

Issue 1569673002: [NOT FOR LANDING] Detailed loading traces Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 "content/browser/loader/layered_resource_handler.h" 5 #include "content/browser/loader/layered_resource_handler.h"
6 6
7 #include <utility> 7 #include <utility>
8 8 #include "base/trace_event/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 LayeredResourceHandler::LayeredResourceHandler( 13 LayeredResourceHandler::LayeredResourceHandler(
14 net::URLRequest* request, 14 net::URLRequest* request,
15 scoped_ptr<ResourceHandler> next_handler) 15 scoped_ptr<ResourceHandler> next_handler)
16 : ResourceHandler(request), next_handler_(std::move(next_handler)) {} 16 : ResourceHandler(request), next_handler_(std::move(next_handler)) {}
17 17
18 LayeredResourceHandler::~LayeredResourceHandler() { 18 LayeredResourceHandler::~LayeredResourceHandler() {
19 TRACE_EVENT0("toplevel", "LayeredResourceHandler::~LayeredResourceHandler");
19 } 20 }
20 21
21 void LayeredResourceHandler::SetController(ResourceController* controller) { 22 void LayeredResourceHandler::SetController(ResourceController* controller) {
22 ResourceHandler::SetController(controller); 23 ResourceHandler::SetController(controller);
23 24
24 // Pass the controller down to the next handler. This method is intended to 25 // Pass the controller down to the next handler. This method is intended to
25 // be overriden by subclasses of LayeredResourceHandler that need to insert a 26 // be overriden by subclasses of LayeredResourceHandler that need to insert a
26 // different ResourceController. 27 // different ResourceController.
27 28
28 DCHECK(next_handler_.get()); 29 DCHECK(next_handler_.get());
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 DCHECK(next_handler_.get()); 75 DCHECK(next_handler_.get());
75 next_handler_->OnResponseCompleted(status, security_info, defer); 76 next_handler_->OnResponseCompleted(status, security_info, defer);
76 } 77 }
77 78
78 void LayeredResourceHandler::OnDataDownloaded(int bytes_downloaded) { 79 void LayeredResourceHandler::OnDataDownloaded(int bytes_downloaded) {
79 DCHECK(next_handler_.get()); 80 DCHECK(next_handler_.get());
80 next_handler_->OnDataDownloaded(bytes_downloaded); 81 next_handler_->OnDataDownloaded(bytes_downloaded);
81 } 82 }
82 83
83 } // namespace content 84 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/detachable_resource_handler.cc ('k') | content/browser/loader/mime_type_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698