Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / components / search_engines / testing_search_terms_data.cc
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/testing_search_terms_data.h"
6
7 #include "base/strings/utf_string_conversions.h"
8
9 TestingSearchTermsData::TestingSearchTermsData(
10     const std::string& google_base_url)
11     : google_base_url_(google_base_url),
12       enable_answers_in_suggest_(false),
13       is_showing_search_terms_on_search_results_pages_(false) {
14 }
15
16 TestingSearchTermsData::~TestingSearchTermsData() {}
17
18 std::string TestingSearchTermsData::GoogleBaseURLValue() const {
19   return google_base_url_;
20 }
21
22 base::string16 TestingSearchTermsData::GetRlzParameterValue(
23     bool from_app_list) const {
24   return base::ASCIIToUTF16(
25       from_app_list ? "rlz_parameter_from_app_list" : "rlz_parameter");
26 }
27
28 std::string TestingSearchTermsData::GetSearchClient() const {
29   return search_client_;
30 }
31
32 std::string TestingSearchTermsData::GoogleImageSearchSource() const {
33   return "google_image_search_source";
34 }
35
36 bool TestingSearchTermsData::EnableAnswersInSuggest() const {
37   return enable_answers_in_suggest_;
38 }
39
40 bool TestingSearchTermsData::IsShowingSearchTermsOnSearchResultsPages() const {
41   return is_showing_search_terms_on_search_results_pages_;
42 }
43
44 int TestingSearchTermsData::OmniboxStartMargin() const {
45   return omnibox_start_margin_;
46 }