[email protected] | eb7c2e2 | 2014-06-12 16:26:07 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "components/search_engines/search_terms_data.h" |
| 6 | |
| 7 | #include "base/logging.h" |
| 8 | #include "components/google/core/browser/google_url_tracker.h" |
| 9 | #include "url/gurl.h" |
| 10 | |
| 11 | SearchTermsData::SearchTermsData() { |
| 12 | } |
| 13 | |
| 14 | SearchTermsData::~SearchTermsData() { |
| 15 | } |
| 16 | |
| 17 | std::string SearchTermsData::GoogleBaseURLValue() const { |
| 18 | return GoogleURLTracker::kDefaultGoogleHomepage; |
| 19 | } |
| 20 | |
| 21 | std::string SearchTermsData::GoogleBaseSuggestURLValue() const { |
| 22 | // Start with the Google base URL. |
| 23 | const GURL base_url(GoogleBaseURLValue()); |
| 24 | DCHECK(base_url.is_valid()); |
| 25 | |
| 26 | GURL::Replacements repl; |
| 27 | |
| 28 | // Replace any existing path with "/complete/". |
mgiuca | 77752c3 | 2015-02-05 07:31:18 | [diff] [blame] | 29 | repl.SetPathStr("/complete/"); |
[email protected] | eb7c2e2 | 2014-06-12 16:26:07 | [diff] [blame] | 30 | |
| 31 | // Clear the query and ref. |
| 32 | repl.ClearQuery(); |
| 33 | repl.ClearRef(); |
| 34 | return base_url.ReplaceComponents(repl).spec(); |
| 35 | } |
| 36 | |
| 37 | std::string SearchTermsData::GetApplicationLocale() const { |
| 38 | return "en"; |
| 39 | } |
| 40 | |
| 41 | base::string16 SearchTermsData::GetRlzParameterValue(bool from_app_list) const { |
| 42 | return base::string16(); |
| 43 | } |
| 44 | |
| 45 | std::string SearchTermsData::GetSearchClient() const { |
| 46 | return std::string(); |
| 47 | } |
| 48 | |
| 49 | std::string SearchTermsData::GetSuggestClient() const { |
| 50 | return std::string(); |
| 51 | } |
| 52 | |
| 53 | std::string SearchTermsData::GetSuggestRequestIdentifier() const { |
| 54 | return std::string(); |
| 55 | } |
| 56 | |
[email protected] | 1020fead | 2014-06-20 13:40:28 | [diff] [blame] | 57 | std::string SearchTermsData::GoogleImageSearchSource() const { |
| 58 | return std::string(); |
| 59 | } |
tedchoc | 2928c63 | 2017-05-11 18:31:28 | [diff] [blame] | 60 | |
| 61 | std::string SearchTermsData::GetYandexReferralID() const { |
| 62 | return std::string(); |
| 63 | } |
Yusuf Ozuysal | 82ed511e | 2017-08-29 23:24:52 | [diff] [blame] | 64 | |
| 65 | std::string SearchTermsData::GetMailRUReferralID() const { |
| 66 | return std::string(); |
| 67 | } |
Denis Yaroshevskiy | 361a5932 | 2018-02-12 20:16:12 | [diff] [blame] | 68 | |
| 69 | size_t SearchTermsData::EstimateMemoryUsage() const { |
| 70 | return 0; |
| 71 | } |