OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 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. | |
4 | |
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_ALLOW_CANCEL_RESOURCE_HANDLER_H_ | |
6 #define CONTENT_BROWSER_RENDERER_HOST_ALLOW_CANCEL_RESOURCE_HANDLER_H_ | |
7 #pragma once | |
8 | |
9 #include "content/browser/renderer_host/resource_handler.h" | |
10 | |
11 // Resource Handler that DCHECKs on all events but canceling and failing of | |
12 // requests. | |
13 class AllowCancelResourceHandler : public ResourceHandler { | |
Matt Perry
2012/01/05 23:52:44
This is a bit awkwardly named IMO. Something more
battre
2012/01/06 02:18:02
Done.
| |
14 public: | |
15 AllowCancelResourceHandler(); | |
16 | |
17 // ResourceHandler implementation: | |
18 virtual bool OnUploadProgress(int request_id, | |
19 uint64 position, | |
20 uint64 size) OVERRIDE; | |
21 virtual bool OnRequestRedirected(int request_id, | |
22 const GURL& new_url, | |
23 content::ResourceResponse* response, | |
24 bool* defer) OVERRIDE; | |
25 virtual bool OnResponseStarted(int request_id, | |
26 content::ResourceResponse* response) OVERRIDE; | |
27 virtual bool OnWillStart(int request_id, | |
28 const GURL& url, | |
29 bool* defer) OVERRIDE; | |
30 virtual bool OnWillRead(int request_id, | |
31 net::IOBuffer** buf, | |
32 int* buf_size, | |
33 int min_size) OVERRIDE; | |
34 virtual bool OnReadCompleted(int request_id, | |
35 int* bytes_read) OVERRIDE; | |
36 virtual bool OnResponseCompleted(int request_id, | |
37 const net::URLRequestStatus& status, | |
38 const std::string& security_info) OVERRIDE; | |
39 virtual void OnRequestClosed() OVERRIDE; | |
40 virtual void OnDataDownloaded(int request_id, | |
41 int bytes_downloaded) OVERRIDE; | |
42 | |
43 private: | |
44 virtual ~AllowCancelResourceHandler(); | |
45 | |
46 DISALLOW_COPY_AND_ASSIGN(AllowCancelResourceHandler); | |
47 }; | |
48 | |
49 #endif // CONTENT_BROWSER_RENDERER_HOST_ALLOW_CANCEL_RESOURCE_HANDLER_H_ | |
OLD | NEW |