1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/renderer_host/layered_resource_handler.h"
#include "base/logging.h"
namespace content {
LayeredResourceHandler::LayeredResourceHandler(ResourceHandler* next_handler)
: next_handler_(next_handler) {
}
bool LayeredResourceHandler::OnUploadProgress(int request_id, uint64 position,
uint64 size) {
DCHECK(next_handler_);
return next_handler_->OnUploadProgress(request_id, position, size);
}
bool LayeredResourceHandler::OnRequestRedirected(int request_id,
const GURL& url,
ResourceResponse* response,
bool* defer) {
DCHECK(next_handler_);
return next_handler_->OnRequestRedirected(request_id, url, response, defer);
}
bool LayeredResourceHandler::OnResponseStarted(int request_id,
ResourceResponse* response) {
DCHECK(next_handler_);
return next_handler_->OnResponseStarted(request_id, response);
}
bool LayeredResourceHandler::OnWillStart(int request_id, const GURL& url,
bool* defer) {
DCHECK(next_handler_);
return next_handler_->OnWillStart(request_id, url, defer);
}
bool LayeredResourceHandler::OnWillRead(int request_id, net::IOBuffer** buf,
int* buf_size, int min_size) {
DCHECK(next_handler_);
return next_handler_->OnWillRead(request_id, buf, buf_size, min_size);
}
bool LayeredResourceHandler::OnReadCompleted(int request_id, int* bytes_read) {
DCHECK(next_handler_);
return next_handler_->OnReadCompleted(request_id, bytes_read);
}
bool LayeredResourceHandler::OnResponseCompleted(
int request_id,
const net::URLRequestStatus& status,
const std::string& security_info) {
DCHECK(next_handler_);
return next_handler_->OnResponseCompleted(request_id, status, security_info);
}
void LayeredResourceHandler::OnRequestClosed() {
DCHECK(next_handler_);
next_handler_->OnRequestClosed();
}
void LayeredResourceHandler::OnDataDownloaded(int request_id,
int bytes_downloaded) {
DCHECK(next_handler_);
next_handler_->OnDataDownloaded(request_id, bytes_downloaded);
}
LayeredResourceHandler::~LayeredResourceHandler() {
}
} // namespace content
|