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

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

Issue 2302433002: [NoStatePrefetch] Track redirects in UMA (Closed)
Patch Set: Rebase 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
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_histograms.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 #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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 base::TimeDelta time) const; 101 base::TimeDelta time) const;
102 102
103 // Record the bytes in the prerender, whether it was used or not, and the 103 // Record the bytes in the prerender, whether it was used or not, and the
104 // total number of bytes fetched for this profile since the last call to 104 // total number of bytes fetched for this profile since the last call to
105 // RecordBytes. 105 // RecordBytes.
106 void RecordNetworkBytes(Origin origin, 106 void RecordNetworkBytes(Origin origin,
107 bool used, 107 bool used,
108 int64_t prerender_bytes, 108 int64_t prerender_bytes,
109 int64_t profile_bytes) const; 109 int64_t profile_bytes) const;
110 110
111 // Record resources loaded by NoStatePrefetch. 111 // Called when a NoStatePrefetch request has received a response (including
112 void RecordResourcePrefetch(Origin origin, 112 // redirects). May be called several times per resource, in case of redirects.
113 bool is_main_resource, 113 void RecordPrefetchResponseReceived(Origin origin,
114 bool is_no_store) const; 114 bool is_main_resource,
115 bool is_redirect,
116 bool is_no_store) const;
117
118 // Called when a NoStatePrefetch resource has been loaded. This is called only
119 // once per resource, when all redirects have been resolved.
120 void RecordPrefetchRedirectCount(Origin origin,
121 bool is_main_resource,
122 int redirect_count) const;
115 123
116 private: 124 private:
117 base::TimeTicks GetCurrentTimeTicks() const; 125 base::TimeTicks GetCurrentTimeTicks() const;
118 126
119 // Returns the time elapsed since the last prerender happened. 127 // Returns the time elapsed since the last prerender happened.
120 base::TimeDelta GetTimeSinceLastPrerender() const; 128 base::TimeDelta GetTimeSinceLastPrerender() const;
121 129
122 // Returns whether the PrerenderManager is currently within the prerender 130 // Returns whether the PrerenderManager is currently within the prerender
123 // window - effectively, up to 30 seconds after a prerender tag has been 131 // window - effectively, up to 30 seconds after a prerender tag has been
124 // observed. 132 // observed.
(...skipping 21 matching lines...) Expand all
146 bool seen_pageload_started_after_prerender_; 154 bool seen_pageload_started_after_prerender_;
147 155
148 base::ThreadChecker thread_checker_; 156 base::ThreadChecker thread_checker_;
149 157
150 DISALLOW_COPY_AND_ASSIGN(PrerenderHistograms); 158 DISALLOW_COPY_AND_ASSIGN(PrerenderHistograms);
151 }; 159 };
152 160
153 } // namespace prerender 161 } // namespace prerender
154 162
155 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_ 163 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_HISTOGRAMS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_histograms.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698