OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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/ui_thread_search_terms_data.h" | 5 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/field_trial.h" | 9 #include "base/metrics/field_trial.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 version_info::GetVersionNumber()); | 141 version_info::GetVersionNumber()); |
142 if (version_info::IsOfficialBuild()) | 142 if (version_info::IsOfficialBuild()) |
143 version += " (Official)"; | 143 version += " (Official)"; |
144 version += " " + version_info::GetOSType(); | 144 version += " " + version_info::GetOSType(); |
145 std::string modifier(chrome::GetChannelString()); | 145 std::string modifier(chrome::GetChannelString()); |
146 if (!modifier.empty()) | 146 if (!modifier.empty()) |
147 version += " " + modifier; | 147 version += " " + modifier; |
148 return version; | 148 return version; |
149 } | 149 } |
150 | 150 |
151 std::string UIThreadSearchTermsData::GetAcceptLanguages() const { | |
152 return profile_ ? profile_->GetPrefs()->GetString(prefs::kAcceptLanguages) | |
153 : std::string(); | |
154 } | |
155 | |
156 // static | 151 // static |
157 void UIThreadSearchTermsData::SetGoogleBaseURL(const std::string& base_url) { | 152 void UIThreadSearchTermsData::SetGoogleBaseURL(const std::string& base_url) { |
158 delete google_base_url_; | 153 delete google_base_url_; |
159 google_base_url_ = base_url.empty() ? NULL : new std::string(base_url); | 154 google_base_url_ = base_url.empty() ? NULL : new std::string(base_url); |
160 } | 155 } |
OLD | NEW |