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

Side by Side Diff: chrome/browser/chromeos/preferences_unittest.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/chromeos/preferences.h" 5 #include "chrome/browser/chromeos/preferences.h"
6 6
7 #include "base/json/json_string_value_serializer.h" 7 #include "base/json/json_string_value_serializer.h"
8 #include "base/prefs/pref_member.h" 8 #include "base/prefs/pref_member.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 EXPECT_EQ(enabled_extension_imes, 337 EXPECT_EQ(enabled_extension_imes,
338 enabled_extension_imes_syncable_.GetValue()); 338 enabled_extension_imes_syncable_.GetValue());
339 } 339 }
340 340
341 // Translates engine IDs in a CSV string to input method IDs. 341 // Translates engine IDs in a CSV string to input method IDs.
342 std::string ToInputMethodIds(std::string value) { 342 std::string ToInputMethodIds(std::string value) {
343 std::vector<std::string> tokens; 343 std::vector<std::string> tokens;
344 base::SplitString(value, ',', &tokens); 344 base::SplitString(value, ',', &tokens);
345 std::transform(tokens.begin(), tokens.end(), tokens.begin(), 345 std::transform(tokens.begin(), tokens.end(), tokens.begin(),
346 &extension_ime_util::GetInputMethodIDByEngineID); 346 &extension_ime_util::GetInputMethodIDByEngineID);
347 return JoinString(tokens, ','); 347 return base::JoinString(tokens, ",");
348 } 348 }
349 349
350 StringPrefMember preferred_languages_; 350 StringPrefMember preferred_languages_;
351 StringPrefMember preferred_languages_syncable_; 351 StringPrefMember preferred_languages_syncable_;
352 StringPrefMember preload_engines_; 352 StringPrefMember preload_engines_;
353 StringPrefMember preload_engines_syncable_; 353 StringPrefMember preload_engines_syncable_;
354 StringPrefMember enabled_extension_imes_; 354 StringPrefMember enabled_extension_imes_;
355 StringPrefMember enabled_extension_imes_syncable_; 355 StringPrefMember enabled_extension_imes_syncable_;
356 356
357 private: 357 private:
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 "Syncable values should have added local values on initialization."); 698 "Syncable values should have added local values on initialization.");
699 ExpectGlobalValues( 699 ExpectGlobalValues(
700 "es,en-US", 700 "es,en-US",
701 "xkb:es::spa,xkb:us::eng,xkb:ru::rus,xkb:xy::xyz," + 701 "xkb:es::spa,xkb:us::eng,xkb:ru::rus,xkb:xy::xyz," +
702 ToInputMethodIds("xkb:jp::jpn"), 702 ToInputMethodIds("xkb:jp::jpn"),
703 std::string(kIdentityIMEID) + "," + kUnknownIMEID); 703 std::string(kIdentityIMEID) + "," + kUnknownIMEID);
704 } 704 }
705 } 705 }
706 706
707 } // namespace chromeos 707 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/preferences.cc ('k') | chrome/browser/chromeos/system_logs/debug_daemon_log_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698