| 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 dd4468aa8c2e4011d21709d48616678ee59ce2e4..fc1fe09b432a52f48597308c32d5ac12a6e0e5ff 100644
|
| --- a/chrome/browser/search_engines/search_terms_data.h
|
| +++ b/chrome/browser/search_engines/search_terms_data.h
|
| @@ -35,6 +35,14 @@ class SearchTermsData {
|
| virtual string16 GetRlzParameterValue() const = 0;
|
| #endif
|
|
|
| + // Returns a string indicating whether Instant (in the visible-preview mode)
|
| + // is enabled, suitable for adding as a query string param to the homepage
|
| + // (instant_url) request. Returns an empty string if Instant is disabled,
|
| + // or if it's only active in a hidden field trial mode. Determining this
|
| + // requires accessing the Profile, so this can only ever be non-empty for
|
| + // UIThreadSearchTermsData.
|
| + virtual std::string InstantEnabledParam() const;
|
| +
|
| // 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. Checking the field trial group requires
|
| @@ -51,8 +59,8 @@ class UIThreadSearchTermsData : public SearchTermsData {
|
| public:
|
| UIThreadSearchTermsData();
|
|
|
| - // Callers who need an accurate answer from InstantFieldTrialUrlParam() must
|
| - // set the profile here before calling that.
|
| + // Callers who need an accurate answer from InstantFieldTrialUrlParam() or
|
| + // InstantEnabledParam() must set the profile here before calling them.
|
| void set_profile(Profile* profile) { profile_ = profile; }
|
|
|
| // Implementation of SearchTermsData.
|
| @@ -64,6 +72,10 @@ class UIThreadSearchTermsData : public SearchTermsData {
|
|
|
| // This returns the empty string unless set_profile() has been called with a
|
| // non-NULL Profile.
|
| + virtual std::string InstantEnabledParam() const OVERRIDE;
|
| +
|
| + // This returns the empty string unless set_profile() has been called with a
|
| + // non-NULL Profile.
|
| virtual std::string InstantFieldTrialUrlParam() const OVERRIDE;
|
|
|
| // Used by tests to set the value for the Google base url. This takes
|
|
|