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

Unified Diff: chrome/browser/ui/search/search.h

Issue 11743035: Disable the embedded search field trials for users with themes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove theme logic on android builds. Created 7 years, 11 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 | « no previous file | chrome/browser/ui/search/search.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search.h
diff --git a/chrome/browser/ui/search/search.h b/chrome/browser/ui/search/search.h
index 4aa020cf6ec217830f7a531c2e1f940980070516..028c957693f9a7de1cd593a843ebb08ccca4a07e 100644
--- a/chrome/browser/ui/search/search.h
+++ b/chrome/browser/ui/search/search.h
@@ -5,6 +5,10 @@
#ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_H_
#define CHROME_BROWSER_UI_SEARCH_SEARCH_H_
+#include <string>
+#include <utility>
+#include <vector>
+
#include "base/basictypes.h"
class Profile;
@@ -14,22 +18,51 @@ namespace search {
// Returns whether the Instant extended API is enabled for the given |profile|.
// |profile| may not be NULL.
-bool IsInstantExtendedAPIEnabled(const Profile* profile);
+bool IsInstantExtendedAPIEnabled(Profile* profile);
// Returns the value to pass to the &espv cgi parameter when loading the
// embedded search page from the user's default search provider. Will be
// 0 if the Instant Extended API is not enabled.
-uint64 EmbeddedSearchPageVersion(const Profile* profile);
+uint64 EmbeddedSearchPageVersion(Profile* profile);
// Force the instant extended API to be enabled for tests.
void EnableInstantExtendedAPIForTesting();
// Returns whether query extraction is enabled.
-bool IsQueryExtractionEnabled(const Profile* profile);
+bool IsQueryExtractionEnabled(Profile* profile);
// Force query extraction to be enabled for tests.
void EnableQueryExtractionForTesting();
+// Type for a collection of experiment configuration parameters.
+typedef std::vector<std::pair<std::string, std::string> > FieldTrialFlags;
+
+// Given a field trial group name, parses out the group number and configuration
+// flags.
+// Exposed for testing only.
+void GetFieldTrialInfo(const std::string& group_name,
+ FieldTrialFlags* flags,
+ uint64* group_number);
+
+// Given a FieldTrialFlags object, returns the string value of the provided
+// flag.
+// Exposed for testing only.
+std::string GetStringValueForFlagWithDefault(
+ const std::string& flag,
+ const std::string& default_value,
+ FieldTrialFlags& flags);
+
+// Given a FieldTrialFlags object, returns the uint64 value of the provided
+// flag.
+// Exposed for testing only.
+uint64 GetUInt64ValueForFlagWithDefault(
+ const std::string& flag, uint64 default_value, FieldTrialFlags& flags);
+
+// Given a FieldTrialFlags object, returns the bool value of the provided flag.
+// Exposed for testing only.
+bool GetBoolValueForFlagWithDefault(
+ const std::string& flag, bool default_value, FieldTrialFlags& flags);
+
} // namespace search
} // namespace chrome
« no previous file with comments | « no previous file | chrome/browser/ui/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698