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

Unified Diff: chrome/browser/prerender/prerender_util.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/prerender/prerender_manager_unittest.cc ('k') | chrome/browser/prerender/prerender_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prerender/prerender_util.h
===================================================================
--- chrome/browser/prerender/prerender_util.h (revision 0)
+++ chrome/browser/prerender/prerender_util.h (revision 0)
@@ -0,0 +1,29 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_
+#define CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_
+
+#include "base/basictypes.h"
+#include "googleurl/src/gurl.h"
+
+namespace prerender {
+
+// ID indicating that no experiment is active.
+const uint8 kNoExperiment = 0;
+
+// Extracts a urlencoded URL stored in a url= query parameter from a URL
+// supplied, if available, and stores it in alias_url. Returns whether or not
+// the operation succeeded (i.e. a valid URL was found).
+bool MaybeGetQueryStringBasedAliasURL(const GURL& url, GURL* alias_url);
+
+// Extracts an experiment stored in the query parameter
+// lpe= from the URL supplied, and returns it.
+// Returns kNoExperiment if no experiment ID is found, or if the ID
+// is not an integer in the range 1 to 9.
+uint8 GetQueryStringBasedExperiment(const GURL& url);
+
+} // namespace prerender
+
+#endif // CHROME_BROWSER_PRERENDER_PRERENDER_UTIL_H_
« no previous file with comments | « chrome/browser/prerender/prerender_manager_unittest.cc ('k') | chrome/browser/prerender/prerender_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698