Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1450)

Unified Diff: components/search_engines/testing_search_terms_data.cc

Issue 492963005: Stop using UIThreadSearchTermsData for search_engines related tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use make_scoped_ptr Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/search_engines/testing_search_terms_data.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/testing_search_terms_data.cc
diff --git a/components/search_engines/testing_search_terms_data.cc b/components/search_engines/testing_search_terms_data.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f3418c93dac2dd7bf8dd64ca234883716ecdc951
--- /dev/null
+++ b/components/search_engines/testing_search_terms_data.cc
@@ -0,0 +1,46 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/search_engines/testing_search_terms_data.h"
+
+#include "base/strings/utf_string_conversions.h"
+
+TestingSearchTermsData::TestingSearchTermsData(
+ const std::string& google_base_url)
+ : google_base_url_(google_base_url),
+ enable_answers_in_suggest_(false),
+ is_showing_search_terms_on_search_results_pages_(false) {
+}
+
+TestingSearchTermsData::~TestingSearchTermsData() {}
+
+std::string TestingSearchTermsData::GoogleBaseURLValue() const {
+ return google_base_url_;
+}
+
+base::string16 TestingSearchTermsData::GetRlzParameterValue(
+ bool from_app_list) const {
+ return base::ASCIIToUTF16(
+ from_app_list ? "rlz_parameter_from_app_list" : "rlz_parameter");
+}
+
+std::string TestingSearchTermsData::GetSearchClient() const {
+ return search_client_;
+}
+
+std::string TestingSearchTermsData::GoogleImageSearchSource() const {
+ return "google_image_search_source";
+}
+
+bool TestingSearchTermsData::EnableAnswersInSuggest() const {
+ return enable_answers_in_suggest_;
+}
+
+bool TestingSearchTermsData::IsShowingSearchTermsOnSearchResultsPages() const {
+ return is_showing_search_terms_on_search_results_pages_;
+}
+
+int TestingSearchTermsData::OmniboxStartMargin() const {
+ return omnibox_start_margin_;
+}
« no previous file with comments | « components/search_engines/testing_search_terms_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698