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

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 #pragma once
8
9 #include <set>
10 #include <vector>
gavinp 2012/07/11 23:39:46 Remove unneeded headers.
frankwang 2012/07/12 01:50:36 Done.
11
12 #include "content/browser/renderer_host/layered_resource_handler.h"
13
14 namespace net {
15 class URLRequest;
16 }
17
18 namespace content{
19
20 class DuplicateResourceHandler: public LayeredResourceHandler{
gavinp 2012/07/11 23:39:46 Nit: space before {. Same throughout this CL.
frankwang 2012/07/12 01:50:36 Done.
21
22 public:
23 DuplicateResourceHandler(scoped_ptr<ResourceHandler> next_handler,
24 net::URLRequest* request);
gavinp 2012/07/11 23:39:46 Nit: indent
frankwang 2012/07/12 01:50:36 Done.
25 virtual ~DuplicateResourceHandler();
26
27 private:
28 // ResourceHandler implementation
29 virtual bool OnWillRead(int request_id,
30 net::IOBuffer** buf,
31 int* buf_size,
32 int min_size) OVERRIDE;
33 virtual bool OnReadCompleted(int request_id, int bytes_read,
34 bool* defer) OVERRIDE;
35
36 int bytes_hit_; // bytes that hit element in cache
37 int bytes_miss_; // bytes that miss element in cache
38 int read_buffer_size_;
39 scoped_refptr<net::IOBuffer> read_buffer_;
gavinp 2012/07/11 23:39:46 Include base/memory/ref_counted.h for this. Also,
frankwang 2012/07/12 01:50:36 Done.
40 net::URLRequest* request_;
41
42 DISALLOW_COPY_AND_ASSIGN(DuplicateResourceHandler);
43 }; // class DuplicateResourceHandler
gavinp 2012/07/11 23:39:46 Nit: two spaces before //. Same issue throughout t
frankwang 2012/07/12 01:50:36 Done.
44
45 } // namespace content
46
47
48 #endif // CONTENT_BROWSER_RENDERER_HOST_DUPLICATE_RESOURCE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698