| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef IOS_CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_ | 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_ | 6 #define IOS_CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/threading/thread_checker.h" | 9 #include "base/threading/thread_checker.h" |
| 10 #include "components/search_engines/search_terms_data.h" | 10 #include "components/search_engines/search_terms_data.h" |
| 11 | 11 |
| 12 namespace ios { | 12 namespace ios { |
| 13 | 13 |
| 14 class ChromeBrowserState; | 14 class ChromeBrowserState; |
| 15 | 15 |
| 16 // Implementation of SearchTermsData that is only usable on UI thread. | 16 // Implementation of SearchTermsData that is only usable on UI thread. |
| 17 class UIThreadSearchTermsData : public SearchTermsData { | 17 class UIThreadSearchTermsData : public SearchTermsData { |
| 18 public: | 18 public: |
| 19 explicit UIThreadSearchTermsData(ios::ChromeBrowserState* browser_state); | 19 explicit UIThreadSearchTermsData(ios::ChromeBrowserState* browser_state); |
| 20 ~UIThreadSearchTermsData() override; | 20 ~UIThreadSearchTermsData() override; |
| 21 | 21 |
| 22 // SearchTermsData implementation. | 22 // SearchTermsData implementation. |
| 23 std::string GoogleBaseURLValue() const override; | 23 std::string GoogleBaseURLValue() const override; |
| 24 std::string GetApplicationLocale() const override; | 24 std::string GetApplicationLocale() const override; |
| 25 base::string16 GetRlzParameterValue(bool from_app_list) const override; | 25 base::string16 GetRlzParameterValue(bool from_app_list) const override; |
| 26 std::string GetSearchClient() const override; | 26 std::string GetSearchClient() const override; |
| 27 std::string GetSuggestClient() const override; | 27 std::string GetSuggestClient() const override; |
| 28 std::string GetSuggestRequestIdentifier() const override; | 28 std::string GetSuggestRequestIdentifier() const override; |
| 29 bool IsShowingSearchTermsOnSearchResultsPages() const override; | |
| 30 std::string InstantExtendedEnabledParam(bool for_search) const override; | 29 std::string InstantExtendedEnabledParam(bool for_search) const override; |
| 31 std::string ForceInstantResultsParam(bool for_prerender) const override; | 30 std::string ForceInstantResultsParam(bool for_prerender) const override; |
| 32 int OmniboxStartMargin() const override; | |
| 33 std::string NTPIsThemedParam() const override; | |
| 34 std::string IOSWebViewTypeParam() const override; | 31 std::string IOSWebViewTypeParam() const override; |
| 35 std::string GoogleImageSearchSource() const override; | 32 std::string GoogleImageSearchSource() const override; |
| 36 | 33 |
| 37 private: | 34 private: |
| 38 base::ThreadChecker thread_checker_; | 35 base::ThreadChecker thread_checker_; |
| 39 ios::ChromeBrowserState* browser_state_; | 36 ios::ChromeBrowserState* browser_state_; |
| 40 | 37 |
| 41 DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData); | 38 DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData); |
| 42 }; | 39 }; |
| 43 | 40 |
| 44 } // namespace ios | 41 } // namespace ios |
| 45 | 42 |
| 46 #endif // IOS_CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_ | 43 #endif // IOS_CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_ |
| OLD | NEW |