diff options
author | brettw <brettw@chromium.org> | 2015-06-29 15:53:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-29 22:54:47 +0000 |
commit | b45192d3bd4592b3703dd8a025d238688ba162cd (patch) | |
tree | 6d08a16c7268c4ff2894dacdcd866f93f0719203 /components/pairing | |
parent | f59ef141c9c00f1b60071f91636836ec506ebd95 (diff) | |
download | chromium_src-b45192d3bd4592b3703dd8a025d238688ba162cd.zip chromium_src-b45192d3bd4592b3703dd8a025d238688ba162cd.tar.gz chromium_src-b45192d3bd4592b3703dd8a025d238688ba162cd.tar.bz2 |
Replace more Tokenize calls with base::SplitString
This also replaces a few StartsWithASCII calls with the new StartsWith in cases where the deprecated ASCII version appeared in code I was changing.
NOPRESUBMIT=true
(due to weird include ordering of _kde.cc file which a comment in the file says is required)
Review URL: https://codereview.chromium.org/1202963003
Cr-Commit-Position: refs/heads/master@{#336670}
Diffstat (limited to 'components/pairing')
-rw-r--r-- | components/pairing/fake_controller_pairing_controller.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/pairing/fake_controller_pairing_controller.cc b/components/pairing/fake_controller_pairing_controller.cc index 0d30e06..ff24b9e 100644 --- a/components/pairing/fake_controller_pairing_controller.cc +++ b/components/pairing/fake_controller_pairing_controller.cc @@ -55,9 +55,10 @@ void FakeControllerPairingController::ApplyConfig(const std::string& config) { dict.count("fail_enrollment") && (dict["fail_enrollment"] == "1"); if (dict.count("connection_lost")) { - Tokens lost_begin_end; - CHECK(Tokenize(dict["connection_lost"], "-", &lost_begin_end) == 2) - << "Wrong 'connection_lost' format."; + Tokens lost_begin_end = base::SplitString( + dict["connection_lost"], "-", base::KEEP_WHITESPACE, + base::SPLIT_WANT_NONEMPTY); + CHECK_EQ(2u, lost_begin_end.size()) << "Wrong 'connection_lost' format."; int begin = 0; int end = 0; CHECK(base::StringToInt(lost_begin_end[0], &begin) && |