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..887c4d8e91772d20cfc79c2fc216ed4761be3f14 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. |
Peter Kasting
2011/08/11 18:04:34
Nit: Might want to add "Checking this requires acc
sreeram
2011/08/11 18:22:19
Done.
|
+ virtual std::string InstantFieldTrialUrlParam() const; |
+ |
private: |
DISALLOW_COPY_AND_ASSIGN(SearchTermsData); |
}; |
@@ -47,14 +54,21 @@ class UIThreadSearchTermsData : public SearchTermsData { |
#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) |
virtual string16 GetRlzParameterValue() const; |
#endif |
+ virtual std::string InstantFieldTrialUrlParam() const; |
Peter Kasting
2011/08/11 18:04:34
Nit: Add comment: "// This returns the empty strin
sreeram
2011/08/11 18:22:19
Done.
|
// Used by tests to set the value for the Google base url. This takes |
// ownership of the given std::string. |
static void SetGoogleBaseURL(std::string* google_base_url); |
+ // Optionally, set the profile to be used to look up params for the Instant |
Peter Kasting
2011/08/11 18:04:34
Nit: I'd move this below the constructor and make
|
+ // field trial. |
+ void SetProfile(Profile* profile); |
+ |
private: |
static std::string* google_base_url_; |
Peter Kasting
2011/08/11 18:04:34
Nit: Unnecessary newline
sreeram
2011/08/11 18:22:19
Done.
|
+ Profile* profile_; |
+ |
DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData); |
}; |