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

Side by Side Diff: chrome/browser/prerender/prerender_histograms.h

Issue 2287993003: [NoStatePrefetch] Add UMA histogram to count prefetch requests (Closed)
Patch Set: comment Created 4 years, 3 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
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 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 base::TimeDelta time) const; 100 base::TimeDelta time) const;
101 101
102 // Record the bytes in the prerender, whether it was used or not, and the 102 // Record the bytes in the prerender, whether it was used or not, and the
103 // total number of bytes fetched for this profile since the last call to 103 // total number of bytes fetched for this profile since the last call to
104 // RecordBytes. 104 // RecordBytes.
105 void RecordNetworkBytes(Origin origin, 105 void RecordNetworkBytes(Origin origin,
106 bool used, 106 bool used,
107 int64_t prerender_bytes, 107 int64_t prerender_bytes,
108 int64_t profile_bytes); 108 int64_t profile_bytes);
109 109
110 // Record resources loaded by NoStatePrefetch.
111 void RecordResourcePrefetch(Origin origin,
112 bool is_main_resource,
113 bool is_no_store);
114
110 private: 115 private:
111 base::TimeTicks GetCurrentTimeTicks() const; 116 base::TimeTicks GetCurrentTimeTicks() const;
112 117
113 // Returns the time elapsed since the last prerender happened. 118 // Returns the time elapsed since the last prerender happened.
114 base::TimeDelta GetTimeSinceLastPrerender() const; 119 base::TimeDelta GetTimeSinceLastPrerender() const;
115 120
116 // Returns whether the PrerenderManager is currently within the prerender 121 // Returns whether the PrerenderManager is currently within the prerender
117 // window - effectively, up to 30 seconds after a prerender tag has been 122 // window - effectively, up to 30 seconds after a prerender tag has been
118 // observed. 123 // observed.
119 bool WithinWindow() const; 124 bool WithinWindow() const;
(...skipping 18 matching lines...) Expand all
138 // start recording events before the first prerender occurs. 143 // start recording events before the first prerender occurs.
139 bool seen_any_pageload_; 144 bool seen_any_pageload_;
140 bool seen_pageload_started_after_prerender_; 145 bool seen_pageload_started_after_prerender_;
141 146
142 DISALLOW_COPY_AND_ASSIGN(PrerenderHistograms); 147 DISALLOW_COPY_AND_ASSIGN(PrerenderHistograms);
143 }; 148 };
144 149
145 } // namespace prerender 150 } // namespace prerender
146 151
147 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_ 152 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_histograms.cc » ('j') | chrome/browser/prerender/prerender_histograms.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698