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

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

Issue 10824236: Only track http and https in duplicate resource handler metrics (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cosnt Created 8 years, 4 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
« no previous file with comments | « no previous file | content/browser/renderer_host/duplicate_content_resource_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // DuplicateContentResourceHandler keeps a hash of resources seen and based on 5 // DuplicateContentResourceHandler keeps a hash of resources seen and based on
6 // url. It is an experiment meant to simulate cache hits for both a url-based 6 // url. It is an experiment meant to simulate cache hits for both a url-based
7 // and a content-based cache. 7 // and a content-based cache.
8 8
9 #ifndef CONTENT_BROWSER_RENDERER_HOST_DUPLICATE_CONTENT_RESOURCE_HANDLER_H_ 9 #ifndef CONTENT_BROWSER_RENDERER_HOST_DUPLICATE_CONTENT_RESOURCE_HANDLER_H_
10 #define CONTENT_BROWSER_RENDERER_HOST_DUPLICATE_CONTENT_RESOURCE_HANDLER_H_ 10 #define CONTENT_BROWSER_RENDERER_HOST_DUPLICATE_CONTENT_RESOURCE_HANDLER_H_
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 ResourceType::Type resource_type_; 49 ResourceType::Type resource_type_;
50 int bytes_read_; 50 int bytes_read_;
51 scoped_refptr<net::IOBuffer> read_buffer_; 51 scoped_refptr<net::IOBuffer> read_buffer_;
52 net::URLRequest* request_; 52 net::URLRequest* request_;
53 53
54 // These values are temporary values that are used in each digest of the 54 // These values are temporary values that are used in each digest of the
55 // inputs for the incremental hash (PMurHash). 55 // inputs for the incremental hash (PMurHash).
56 MH_UINT32 pmurhash_ph1_; 56 MH_UINT32 pmurhash_ph1_;
57 MH_UINT32 pmurhash_pcarry_; 57 MH_UINT32 pmurhash_pcarry_;
58 58
59 // Used to track if it's a request we're interested in. If it's not, then we
60 // early out to avoid calculating the hash unnecessarily.
61 bool track_request_;
62
59 DISALLOW_COPY_AND_ASSIGN(DuplicateContentResourceHandler); 63 DISALLOW_COPY_AND_ASSIGN(DuplicateContentResourceHandler);
60 }; 64 };
61 65
62 } // namespace content 66 } // namespace content
63 67
64 #endif // CONTENT_BROWSER_RENDERER_HOST_DUPLICATE_CONTENT_RESOURCE_HANDLER_H_ 68 #endif // CONTENT_BROWSER_RENDERER_HOST_DUPLICATE_CONTENT_RESOURCE_HANDLER_H_
65 69
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/duplicate_content_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698