Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / search_engines / ui_thread_search_terms_data.h
blob616bdd0e991e86b2a20fa3535ad9a9e5817834e5
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_
6 #define CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "base/strings/string16.h"
13 #include "components/search_engines/search_terms_data.h"
15 class Profile;
17 // Implementation of SearchTermsData that is only usable on the UI thread.
18 class UIThreadSearchTermsData : public SearchTermsData {
19 public:
20 // If |profile_| is NULL, the Google base URL accessors will return default
21 // values, and NTPIsThemedParam() will return an empty string.
22 explicit UIThreadSearchTermsData(Profile* profile);
24 std::string GoogleBaseURLValue() const override;
25 std::string GetApplicationLocale() const override;
26 base::string16 GetRlzParameterValue(bool from_app_list) const override;
27 std::string GetSearchClient() const override;
28 std::string GetSuggestClient() const override;
29 std::string GetSuggestRequestIdentifier() const override;
30 bool EnableAnswersInSuggest() const override;
31 bool IsShowingSearchTermsOnSearchResultsPages() const override;
32 std::string InstantExtendedEnabledParam(bool for_search) const override;
33 std::string ForceInstantResultsParam(bool for_prerender) const override;
34 int OmniboxStartMargin() const override;
35 std::string NTPIsThemedParam() const override;
36 std::string GoogleImageSearchSource() const override;
38 // Used by tests to override the value for the Google base URL. Passing the
39 // empty string cancels this override.
40 static void SetGoogleBaseURL(const std::string& base_url);
42 private:
43 static std::string* google_base_url_;
44 Profile* profile_;
46 DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData);
49 #endif // CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_