1 // Copyright 2015 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 IOS_CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_
6 #define IOS_CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_
8 #include "base/macros.h"
9 #include "base/threading/thread_checker.h"
10 #include "components/search_engines/search_terms_data.h"
14 class ChromeBrowserState
;
16 // Implementation of SearchTermsData that is only usable on UI thread.
17 class UIThreadSearchTermsData
: public SearchTermsData
{
19 explicit UIThreadSearchTermsData(ios::ChromeBrowserState
* browser_state
);
20 ~UIThreadSearchTermsData() override
;
22 // SearchTermsData implementation.
23 std::string
GoogleBaseURLValue() const override
;
24 std::string
GetApplicationLocale() const override
;
25 base::string16
GetRlzParameterValue(bool from_app_list
) const override
;
26 std::string
GetSearchClient() const override
;
27 std::string
GetSuggestClient() const override
;
28 std::string
GetSuggestRequestIdentifier() const override
;
29 bool IsShowingSearchTermsOnSearchResultsPages() const override
;
30 std::string
InstantExtendedEnabledParam(bool for_search
) const override
;
31 std::string
ForceInstantResultsParam(bool for_prerender
) const override
;
32 int OmniboxStartMargin() const override
;
33 std::string
NTPIsThemedParam() const override
;
34 std::string
GoogleImageSearchSource() const override
;
37 base::ThreadChecker thread_checker_
;
38 ios::ChromeBrowserState
* browser_state_
;
40 DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData
);
45 #endif // IOS_CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_