Index: chrome/browser/search_engines/search_terms_data.h |
diff --git a/chrome/browser/search_engines/search_terms_data.h b/chrome/browser/search_engines/search_terms_data.h |
index a695a113c7eca0c3c50913ef03895142f98e1622..f5021a5940753b51bde22b56fea6857056ee5e88 100644 |
--- a/chrome/browser/search_engines/search_terms_data.h |
+++ b/chrome/browser/search_engines/search_terms_data.h |
@@ -11,6 +11,8 @@ |
#include "base/basictypes.h" |
#include "base/string16.h" |
+class Profile; |
+ |
// All data needed by TemplateURLRef::ReplaceSearchTerms which typically may |
// only be accessed on the UI thread. |
class SearchTermsData { |
@@ -32,6 +34,11 @@ class SearchTermsData { |
virtual string16 GetRlzParameterValue() const = 0; |
#endif |
+ // Returns a string indicating the Instant field trial group, suitable for |
+ // adding as a query string param to suggest/search URLs, or an empty string |
+ // if the field trial is not active. |
+ virtual std::string InstantFieldTrialUrlParam() const; |
+ |
private: |
DISALLOW_COPY_AND_ASSIGN(SearchTermsData); |
}; |
@@ -39,7 +46,7 @@ class SearchTermsData { |
// Implementation of SearchTermsData that is only usable on the UI thread. |
class UIThreadSearchTermsData : public SearchTermsData { |
public: |
- UIThreadSearchTermsData(); |
+ explicit UIThreadSearchTermsData(Profile* profile); |
// Implementation of SearchTermsData. |
virtual std::string GoogleBaseURLValue() const; |
@@ -47,6 +54,7 @@ class UIThreadSearchTermsData : public SearchTermsData { |
#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) |
virtual string16 GetRlzParameterValue() const; |
#endif |
+ virtual std::string InstantFieldTrialUrlParam() const; |
// Used by tests to set the value for the Google base url. This takes |
// ownership of the given std::string. |
@@ -55,6 +63,8 @@ class UIThreadSearchTermsData : public SearchTermsData { |
private: |
static std::string* google_base_url_; |
+ Profile* const profile_; |
+ |
DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData); |
}; |