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

Unified Diff: chrome/browser/instant/instant_controller.h

Issue 5023001: Handful of related instant changes: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linux build Created 10 years, 1 month 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/instant/instant_confirm_dialog.cc ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_controller.h
diff --git a/chrome/browser/instant/instant_controller.h b/chrome/browser/instant/instant_controller.h
index afd6a2d5cb8bd93a9c80c317fb8c9814b4810a29..1d989cb6557b2eabde0a3a74cc24146b771bdc87 100644
--- a/chrome/browser/instant/instant_controller.h
+++ b/chrome/browser/instant/instant_controller.h
@@ -40,12 +40,16 @@ class InstantController : public InstantLoaderDelegate {
public:
// Variations of instant support.
enum Type {
+ // NOTE: these values are persisted to prefs. Don't change them!
+
// Search results are shown for the best guess of what we think the user was
// planning on typing.
- PREDICTIVE_TYPE,
+ PREDICTIVE_TYPE = 0,
// Search results are shown for exactly what was typed.
VERBATIM_TYPE,
+
+ LAST_TYPE = VERBATIM_TYPE,
};
InstantController(Profile* profile, InstantDelegate* delegate);
@@ -54,12 +58,21 @@ class InstantController : public InstantLoaderDelegate {
// Registers instant related preferences.
static void RegisterUserPrefs(PrefService* prefs);
+ // Records instant metrics.
+ static void RecordMetrics(Profile* profile);
+
// Returns true if either type of instant is enabled.
static bool IsEnabled(Profile* profile);
// Returns true if the specified type of instant is enabled.
static bool IsEnabled(Profile* profile, Type type);
+ // Enables instant.
+ static void Enable(Profile* profile);
+
+ // Disables instant.
+ static void Disable(Profile* profile);
+
// Invoked as the user types in the omnibox with the url to navigate to. If
// the url is empty and there is a preview TabContents it is destroyed. If url
// is non-empty and the preview TabContents has not been created it is
« no previous file with comments | « chrome/browser/instant/instant_confirm_dialog.cc ('k') | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698