1 // Copyright 2014 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_
6 #define COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_
8 #include "components/search_engines/search_terms_data.h"
10 class TestingSearchTermsData : public SearchTermsData {
12 explicit TestingSearchTermsData(const std::string& google_base_url);
14 TestingSearchTermsData(const TestingSearchTermsData&) = delete;
15 TestingSearchTermsData& operator=(const TestingSearchTermsData&) = delete;
17 ~TestingSearchTermsData() override;
19 std::string GoogleBaseURLValue() const override;
20 std::u16string GetRlzParameterValue(bool from_app_list) const override;
21 std::string GetSearchClient() const override;
22 std::string GetSuggestClient(RequestSource request_source) const override;
23 std::string GoogleImageSearchSource() const override;
25 // Estimates dynamic memory usage.
26 // See base/trace_event/memory_usage_estimator.h for more info.
27 size_t EstimateMemoryUsage() const override;
29 void set_google_base_url(const std::string& google_base_url) {
30 google_base_url_ = google_base_url;
32 void set_search_client(const std::string& search_client) {
33 search_client_ = search_client;
35 void set_suggest_client(const std::string& suggest_client) {
36 suggest_client_ = suggest_client;
40 std::string google_base_url_;
41 std::string search_client_;
42 std::string suggest_client_;
45 #endif // COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_