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

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

Issue 7289020: Updating histograms to allow for experiments & log origin-based histograms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_CONTENTS_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 virtual ~Factory() {} 54 virtual ~Factory() {}
55 55
56 // Ownership is not transfered through this interface as prerender_manager, 56 // Ownership is not transfered through this interface as prerender_manager,
57 // prerender_tracker, and profile are stored as weak pointers. 57 // prerender_tracker, and profile are stored as weak pointers.
58 virtual PrerenderContents* CreatePrerenderContents( 58 virtual PrerenderContents* CreatePrerenderContents(
59 PrerenderManager* prerender_manager, 59 PrerenderManager* prerender_manager,
60 PrerenderTracker* prerender_tracker, 60 PrerenderTracker* prerender_tracker,
61 Profile* profile, 61 Profile* profile,
62 const GURL& url, 62 const GURL& url,
63 const GURL& referrer, 63 const GURL& referrer,
64 Origin origin) = 0; 64 Origin origin,
65 uint8 experiment_id) = 0;
65 66
66 private: 67 private:
67 DISALLOW_COPY_AND_ASSIGN(Factory); 68 DISALLOW_COPY_AND_ASSIGN(Factory);
68 }; 69 };
69 70
70 virtual ~PrerenderContents(); 71 virtual ~PrerenderContents();
71 72
72 bool Init(); 73 bool Init();
73 74
74 static Factory* CreateFactory(); 75 static Factory* CreateFactory();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 int32 starting_page_id() { return starting_page_id_; } 165 int32 starting_page_id() { return starting_page_id_; }
165 166
166 Value* GetAsValue() const; 167 Value* GetAsValue() const;
167 168
168 protected: 169 protected:
169 PrerenderContents(PrerenderManager* prerender_manager, 170 PrerenderContents(PrerenderManager* prerender_manager,
170 PrerenderTracker* prerender_tracker, 171 PrerenderTracker* prerender_tracker,
171 Profile* profile, 172 Profile* profile,
172 const GURL& url, 173 const GURL& url,
173 const GURL& referrer, 174 const GURL& referrer,
174 Origin origin); 175 Origin origin,
176 uint8 experiment_id);
175 177
176 NotificationRegistrar& notification_registrar() { 178 NotificationRegistrar& notification_registrar() {
177 return notification_registrar_; 179 return notification_registrar_;
178 } 180 }
179 181
180 // Called whenever a RenderViewHost is created for prerendering. Only called 182 // Called whenever a RenderViewHost is created for prerendering. Only called
181 // once the RenderViewHost has a RenderView and RenderWidgetHostView. 183 // once the RenderViewHost has a RenderView and RenderWidgetHostView.
182 virtual void OnRenderViewHostCreated(RenderViewHost* new_render_view_host); 184 virtual void OnRenderViewHostCreated(RenderViewHost* new_render_view_host);
183 185
184 private: 186 private:
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // These are -1 before a RenderView is created. 272 // These are -1 before a RenderView is created.
271 int child_id_; 273 int child_id_;
272 int route_id_; 274 int route_id_;
273 275
274 // Page ID at which prerendering started. 276 // Page ID at which prerendering started.
275 int32 starting_page_id_; 277 int32 starting_page_id_;
276 278
277 // Origin for this prerender. 279 // Origin for this prerender.
278 Origin origin_; 280 Origin origin_;
279 281
282 // Experiment during which this prerender is performed.
283 uint8 experiment_id_;
284
280 // Offset by which to offset prerendered pages 285 // Offset by which to offset prerendered pages
281 static const int32 kPrerenderPageIdOffset = 10; 286 static const int32 kPrerenderPageIdOffset = 10;
282 287
283 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); 288 DISALLOW_COPY_AND_ASSIGN(PrerenderContents);
284 }; 289 };
285 290
286 } // namespace prerender 291 } // namespace prerender
287 292
288 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ 293 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/prerender/prerender_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698