Add a pair of DCHECKs in URLRequestJob for jobs that restart themselves.
[chromium-blink-merge.git] / components / search_engines / search_terms_data.cc
blobe8abc03d36dd457eab34d4c76409b12a3c5e392d
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.
5 #include "components/search_engines/search_terms_data.h"
7 #include "base/logging.h"
8 #include "components/google/core/browser/google_url_tracker.h"
9 #include "url/gurl.h"
11 SearchTermsData::SearchTermsData() {
14 SearchTermsData::~SearchTermsData() {
17 std::string SearchTermsData::GoogleBaseURLValue() const {
18 return GoogleURLTracker::kDefaultGoogleHomepage;
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());
26 GURL::Replacements repl;
28 // Replace any existing path with "/complete/".
29 repl.SetPathStr("/complete/");
31 // Clear the query and ref.
32 repl.ClearQuery();
33 repl.ClearRef();
34 return base_url.ReplaceComponents(repl).spec();
37 std::string SearchTermsData::GetApplicationLocale() const {
38 return "en";
41 base::string16 SearchTermsData::GetRlzParameterValue(bool from_app_list) const {
42 return base::string16();
45 std::string SearchTermsData::GetSearchClient() const {
46 return std::string();
49 std::string SearchTermsData::GetSuggestClient() const {
50 return std::string();
53 std::string SearchTermsData::GetSuggestRequestIdentifier() const {
54 return std::string();
57 bool SearchTermsData::IsShowingSearchTermsOnSearchResultsPages() const {
58 return false;
61 std::string SearchTermsData::InstantExtendedEnabledParam(
62 bool for_search) const {
63 return std::string();
66 std::string SearchTermsData::ForceInstantResultsParam(
67 bool for_prerender) const {
68 return std::string();
71 int SearchTermsData::OmniboxStartMargin() const {
72 return 0;
75 std::string SearchTermsData::NTPIsThemedParam() const {
76 return std::string();
79 std::string SearchTermsData::GoogleImageSearchSource() const {
80 return std::string();
83 std::string SearchTermsData::GetAcceptLanguages() const {
84 return std::string();