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

Side by Side Diff: chrome/browser/chromeos/options/language_config_model.cc

Issue 3750001: base: Move SplitString functions into the base namespace and update the callers. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: brett review, reverted changes in o3d due to it's using an old base revision Created 10 years, 2 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/login/authenticator.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/chromeos/options/language_config_model.h" 5 #include "chrome/browser/chromeos/options/language_config_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 GetActiveInputMethodIds(&input_method_ids); 189 GetActiveInputMethodIds(&input_method_ids);
190 return (std::find(input_method_ids.begin(), input_method_ids.end(), 190 return (std::find(input_method_ids.begin(), input_method_ids.end(),
191 input_method_id) != input_method_ids.end()); 191 input_method_id) != input_method_ids.end());
192 } 192 }
193 193
194 void LanguageConfigModel::GetActiveInputMethodIds( 194 void LanguageConfigModel::GetActiveInputMethodIds(
195 std::vector<std::string>* out_input_method_ids) { 195 std::vector<std::string>* out_input_method_ids) {
196 const std::string value = preload_engines_pref_.GetValue(); 196 const std::string value = preload_engines_pref_.GetValue();
197 out_input_method_ids->clear(); 197 out_input_method_ids->clear();
198 if (!value.empty()) 198 if (!value.empty())
199 SplitString(value, ',', out_input_method_ids); 199 base::SplitString(value, ',', out_input_method_ids);
200 } 200 }
201 201
202 void LanguageConfigModel::GetPreferredLanguageCodes( 202 void LanguageConfigModel::GetPreferredLanguageCodes(
203 std::vector<std::string>* out_language_codes) { 203 std::vector<std::string>* out_language_codes) {
204 const std::string value = preferred_languages_pref_.GetValue(); 204 const std::string value = preferred_languages_pref_.GetValue();
205 out_language_codes->clear(); 205 out_language_codes->clear();
206 if (!value.empty()) 206 if (!value.empty())
207 SplitString(value, ',', out_language_codes); 207 base::SplitString(value, ',', out_language_codes);
208 } 208 }
209 209
210 void LanguageConfigModel::GetInputMethodIdsFromLanguageCode( 210 void LanguageConfigModel::GetInputMethodIdsFromLanguageCode(
211 const std::string& language_code, 211 const std::string& language_code,
212 std::vector<std::string>* input_method_ids) const { 212 std::vector<std::string>* input_method_ids) const {
213 DCHECK(input_method_ids); 213 DCHECK(input_method_ids);
214 input_method_ids->clear(); 214 input_method_ids->clear();
215 input_method::GetInputMethodIdsFromLanguageCode( 215 input_method::GetInputMethodIdsFromLanguageCode(
216 language_code, input_method::kAllInputMethods, input_method_ids); 216 language_code, input_method::kAllInputMethods, input_method_ids);
217 } 217 }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 } 268 }
269 269
270 // Build the vectors from the sets. 270 // Build the vectors from the sets.
271 supported_language_codes_.assign(supported_language_code_set.begin(), 271 supported_language_codes_.assign(supported_language_code_set.begin(),
272 supported_language_code_set.end()); 272 supported_language_code_set.end());
273 supported_input_method_ids_.assign(supported_input_method_id_set.begin(), 273 supported_input_method_ids_.assign(supported_input_method_id_set.begin(),
274 supported_input_method_id_set.end()); 274 supported_input_method_id_set.end());
275 } 275 }
276 276
277 } // namespace chromeos 277 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/authenticator.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698