OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_DUPLICATE_RESOURCE_HANDLER_H_ | |
6 #define CONTENT_BROWSER_RENDERER_HOST_DUPLICATE_RESOURCE_HANDLER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/memory/ref_counted.h" | |
11 #include "content/browser/renderer_host/layered_resource_handler.h" | |
12 #include "webkit/glue/resource_type.h" | |
13 | |
14 namespace net { | |
15 class IOBuffer; | |
16 class URLRequest; | |
17 class URLRequestStatus; | |
18 } | |
19 | |
20 namespace content { | |
21 | |
22 class DuplicateResourceHandler: public LayeredResourceHandler { | |
23 public: | |
24 DuplicateResourceHandler(scoped_ptr<ResourceHandler> next_handler, | |
25 ResourceType::Type resource_type, | |
26 net::URLRequest* request); | |
27 virtual ~DuplicateResourceHandler(); | |
gavinp
2012/07/20 01:37:59
I have no real comment here, except to say that ho
frankwang
2012/07/20 04:50:00
That's an interesting tidbit. Thanks!
| |
28 | |
29 private: | |
30 // ResourceHandler implementation | |
31 virtual bool OnWillRead(int request_id, | |
32 net::IOBuffer** buf, | |
33 int* buf_size, | |
34 int min_size) OVERRIDE; | |
35 virtual bool OnReadCompleted(int request_id, int bytes_read, | |
gavinp
2012/07/20 01:37:59
In method definitions, it's either all on one line
frankwang
2012/07/20 04:50:00
Done.
| |
36 bool* defer) OVERRIDE; | |
37 virtual bool OnResponseCompleted(int request_id, | |
38 const net::URLRequestStatus& status, | |
39 const std::string& security_info) OVERRIDE; | |
40 | |
41 ResourceType::Type resource_type_; | |
42 uint32 pmurhash_ph1_; | |
gavinp
2012/07/20 01:37:59
I would like to see these pmumurhash members separ
frankwang
2012/07/20 04:50:00
Done.
| |
43 uint32 pmurhash_pcarry_; | |
44 int bytes_read_; | |
45 scoped_refptr<net::IOBuffer> read_buffer_; | |
46 net::URLRequest* request_; | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(DuplicateResourceHandler); | |
49 }; | |
50 | |
51 } // namespace content | |
52 | |
53 #endif // CONTENT_BROWSER_RENDERER_HOST_DUPLICATE_RESOURCE_HANDLER_H_ | |
54 | |
OLD | NEW |