Upload upstream chromium 114.0.5735.31
[platform/framework/web/chromium-efl.git] / components / search_engines / testing_search_terms_data.h
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.
4
5 #ifndef COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_
6 #define COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_
7
8 #include "components/search_engines/search_terms_data.h"
9
10 class TestingSearchTermsData : public SearchTermsData {
11  public:
12   explicit TestingSearchTermsData(const std::string& google_base_url);
13
14   TestingSearchTermsData(const TestingSearchTermsData&) = delete;
15   TestingSearchTermsData& operator=(const TestingSearchTermsData&) = delete;
16
17   ~TestingSearchTermsData() override;
18
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;
24
25   // Estimates dynamic memory usage.
26   // See base/trace_event/memory_usage_estimator.h for more info.
27   size_t EstimateMemoryUsage() const override;
28
29   void set_google_base_url(const std::string& google_base_url) {
30     google_base_url_ = google_base_url;
31   }
32   void set_search_client(const std::string& search_client) {
33     search_client_ = search_client;
34   }
35   void set_suggest_client(const std::string& suggest_client) {
36     suggest_client_ = suggest_client;
37   }
38
39  private:
40   std::string google_base_url_;
41   std::string search_client_;
42   std::string suggest_client_;
43 };
44
45 #endif  // COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_