OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_ | 5 #ifndef COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_ |
6 #define COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_ | 6 #define COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_ |
7 | 7 |
8 #include "components/search_engines/search_terms_data.h" | 8 #include "components/search_engines/search_terms_data.h" |
9 | 9 |
10 class TestingSearchTermsData : public SearchTermsData { | 10 class TestingSearchTermsData : public SearchTermsData { |
11 public: | 11 public: |
12 explicit TestingSearchTermsData(const std::string& google_base_url); | 12 explicit TestingSearchTermsData(const std::string& google_base_url); |
13 ~TestingSearchTermsData() override; | 13 ~TestingSearchTermsData() override; |
14 | 14 |
15 std::string GoogleBaseURLValue() const override; | 15 std::string GoogleBaseURLValue() const override; |
16 base::string16 GetRlzParameterValue(bool from_app_list) const override; | 16 base::string16 GetRlzParameterValue(bool from_app_list) const override; |
17 std::string GetSearchClient() const override; | 17 std::string GetSearchClient() const override; |
18 std::string GoogleImageSearchSource() const override; | 18 std::string GoogleImageSearchSource() const override; |
19 bool EnableAnswersInSuggest() const override; | |
20 bool IsShowingSearchTermsOnSearchResultsPages() const override; | 19 bool IsShowingSearchTermsOnSearchResultsPages() const override; |
21 int OmniboxStartMargin() const override; | 20 int OmniboxStartMargin() const override; |
22 | 21 |
23 void set_google_base_url(const std::string& google_base_url) { | 22 void set_google_base_url(const std::string& google_base_url) { |
24 google_base_url_ = google_base_url; | 23 google_base_url_ = google_base_url; |
25 } | 24 } |
26 void set_search_client(const std::string& search_client) { | 25 void set_search_client(const std::string& search_client) { |
27 search_client_ = search_client; | 26 search_client_ = search_client; |
28 } | 27 } |
29 void set_enable_answers_in_suggest(bool enable_answers_in_suggest) { | |
30 enable_answers_in_suggest_ = enable_answers_in_suggest; | |
31 } | |
32 void set_is_showing_search_terms_on_search_results_pages(bool value) { | 28 void set_is_showing_search_terms_on_search_results_pages(bool value) { |
33 is_showing_search_terms_on_search_results_pages_ = value; | 29 is_showing_search_terms_on_search_results_pages_ = value; |
34 } | 30 } |
35 void set_omnibox_start_margin(int omnibox_start_margin) { | 31 void set_omnibox_start_margin(int omnibox_start_margin) { |
36 omnibox_start_margin_ = omnibox_start_margin; | 32 omnibox_start_margin_ = omnibox_start_margin; |
37 } | 33 } |
38 | 34 |
39 private: | 35 private: |
40 std::string google_base_url_; | 36 std::string google_base_url_; |
41 std::string search_client_; | 37 std::string search_client_; |
42 bool enable_answers_in_suggest_; | |
43 bool is_showing_search_terms_on_search_results_pages_; | 38 bool is_showing_search_terms_on_search_results_pages_; |
44 int omnibox_start_margin_; | 39 int omnibox_start_margin_; |
45 | 40 |
46 DISALLOW_COPY_AND_ASSIGN(TestingSearchTermsData); | 41 DISALLOW_COPY_AND_ASSIGN(TestingSearchTermsData); |
47 }; | 42 }; |
48 | 43 |
49 #endif // COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_ | 44 #endif // COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_ |
OLD | NEW |