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

Unified Diff: chrome/browser/chromeos/events/event_rewriter.cc

Issue 1197243004: Replace some Tokenize calls with SplitString. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/events/event_rewriter.cc
diff --git a/chrome/browser/chromeos/events/event_rewriter.cc b/chrome/browser/chromeos/events/event_rewriter.cc
index e73ec8fb1bb1e963ce4749edc1c0d27b33c65085..0b9c9aa17f9fed12004e7293d8e21a308be0f1b4 100644
--- a/chrome/browser/chromeos/events/event_rewriter.cc
+++ b/chrome/browser/chromeos/events/event_rewriter.cc
@@ -13,6 +13,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/prefs/pref_service.h"
+#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/sys_info.h"
#include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
@@ -191,8 +192,8 @@ EventRewriter::DeviceType GetDeviceType(const std::string& device_name,
if (base::LowerCaseEqualsASCII(device_name, "virtual core keyboard"))
return EventRewriter::kDeviceVirtualCoreKeyboard;
- std::vector<std::string> tokens;
- Tokenize(device_name, " .", &tokens);
+ std::vector<std::string> tokens = base::SplitString(
+ device_name, " .", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
// If the |device_name| contains the two words, "apple" and "keyboard", treat
// it as an Apple keyboard.
« no previous file with comments | « chrome/browser/autocomplete/in_memory_url_index_unittest.cc ('k') | chrome/browser/chromeos/file_manager/file_tasks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698