| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/search_engines/search_terms_data.h" | 5 #include "chrome/browser/search_engines/search_terms_data.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 std::string SearchTermsData::InstantEnabledParam() const { | 67 std::string SearchTermsData::InstantEnabledParam() const { |
| 68 return std::string(); | 68 return std::string(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 std::string SearchTermsData::InstantExtendedEnabledParam() const { | 71 std::string SearchTermsData::InstantExtendedEnabledParam() const { |
| 72 return std::string(); | 72 return std::string(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 std::string SearchTermsData::InstantExtendedEnabledKey() const { |
| 76 return google_util::kInstantExtendedAPIParam; |
| 77 } |
| 78 |
| 75 // static | 79 // static |
| 76 std::string* UIThreadSearchTermsData::google_base_url_ = NULL; | 80 std::string* UIThreadSearchTermsData::google_base_url_ = NULL; |
| 77 | 81 |
| 78 UIThreadSearchTermsData::UIThreadSearchTermsData(Profile* profile) | 82 UIThreadSearchTermsData::UIThreadSearchTermsData(Profile* profile) |
| 79 : profile_(profile) { | 83 : profile_(profile) { |
| 80 DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) || | 84 DCHECK(!BrowserThread::IsWellKnownThread(BrowserThread::UI) || |
| 81 BrowserThread::CurrentlyOn(BrowserThread::UI)); | 85 BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 82 } | 86 } |
| 83 | 87 |
| 84 std::string UIThreadSearchTermsData::GoogleBaseURLValue() const { | 88 std::string UIThreadSearchTermsData::GoogleBaseURLValue() const { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 } | 156 } |
| 153 } | 157 } |
| 154 return std::string(); | 158 return std::string(); |
| 155 } | 159 } |
| 156 | 160 |
| 157 // static | 161 // static |
| 158 void UIThreadSearchTermsData::SetGoogleBaseURL(const std::string& base_url) { | 162 void UIThreadSearchTermsData::SetGoogleBaseURL(const std::string& base_url) { |
| 159 delete google_base_url_; | 163 delete google_base_url_; |
| 160 google_base_url_ = base_url.empty() ? NULL : new std::string(base_url); | 164 google_base_url_ = base_url.empty() ? NULL : new std::string(base_url); |
| 161 } | 165 } |
| OLD | NEW |