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

Side by Side Diff: content/browser/renderer_host/duplicate_resource_handler.h

Issue 10701151: DuplicateContentResourceHandler to monitor resources and track how many times th… (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
(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 "googleurl/src/gurl.h"
gavinp 2012/07/18 12:13:32 lose this include.
frankwang 2012/07/19 16:10:26 Done.
13 #include "webkit/glue/resource_type.h"
14
15 namespace net {
16 class IOBuffer;
17 class URLRequest;
18 class URLRequestStatus;
19 }
20
21 namespace content {
22
23 class DuplicateResourceHandler: public LayeredResourceHandler {
24
25 public:
26 DuplicateResourceHandler(scoped_ptr<ResourceHandler> next_handler,
27 ResourceType::Type resource_type,
gavinp 2012/07/18 12:13:32 You're not using this. Lose the parameter if you d
frankwang 2012/07/19 16:10:26 Done.
28 net::URLRequest* request);
29 virtual ~DuplicateResourceHandler();
30
31 private:
32
gavinp 2012/07/18 12:13:32 lose this blank line.
frankwang 2012/07/19 16:10:26 Done.
33 // ResourceHandler implementation
34 virtual bool OnWillRead(int request_id,
35 net::IOBuffer** buf,
36 int* buf_size,
37 int min_size) OVERRIDE;
38 virtual bool OnReadCompleted(int request_id, int bytes_read,
39 bool* defer) OVERRIDE;
40 virtual bool OnResponseCompleted(int request_id,
41 const net::URLRequestStatus& status,
42 const std::string& security_info) OVERRIDE;
43
44 ResourceType::Type resource_type_;
45 uint32 ph1_;
46 uint32 pcarry_;
gavinp 2012/07/18 12:13:32 I'm not a fan of either of these names. I know the
frankwang 2012/07/19 16:10:26 Done.
47 int buffer_size_;
gavinp 2012/07/18 12:13:32 Move this next to read_buffer_.
frankwang 2012/07/19 16:10:26 I deleted the buffer_size_. I never use it anywher
48 int bytes_read_;
49 scoped_refptr<net::IOBuffer> read_buffer_;
gavinp 2012/07/18 12:13:32 You could use an IOBuffer* here safely I believe.
50 net::URLRequest* request_;
51
52 DISALLOW_COPY_AND_ASSIGN(DuplicateResourceHandler);
53 }; // class DuplicateResourceHandler
gavinp 2012/07/18 12:13:32 For short classes, we don't need this comment.
frankwang 2012/07/19 16:10:26 Done.
54
55 } // namespace content
56
gavinp 2012/07/18 12:13:32 Extra blank line.
frankwang 2012/07/19 16:10:26 Done.
57
58 #endif // CONTENT_BROWSER_RENDERER_HOST_DUPLICATE_RESOURCE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698