Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / browser / loader / resource_message_delegate.cc
blob01d3595e904d6fdc12e79746a63b40f88121928f
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/browser/loader/resource_message_delegate.h"
7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 #include "content/browser/loader/resource_request_info_impl.h"
9 #include "net/url_request/url_request.h"
11 namespace content {
13 ResourceMessageDelegate::ResourceMessageDelegate(const net::URLRequest* request)
14 : id_(ResourceRequestInfoImpl::ForRequest(request)->GetGlobalRequestID()) {
15 ResourceDispatcherHostImpl* rdh = ResourceDispatcherHostImpl::Get();
16 rdh->RegisterResourceMessageDelegate(id_, this);
19 ResourceMessageDelegate::~ResourceMessageDelegate() {
20 ResourceDispatcherHostImpl* rdh = ResourceDispatcherHostImpl::Get();
21 rdh->UnregisterResourceMessageDelegate(id_, this);
24 } // namespace content