From b45192d3bd4592b3703dd8a025d238688ba162cd Mon Sep 17 00:00:00 2001 From: brettw Date: Mon, 29 Jun 2015 15:53:24 -0700 Subject: 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} --- components/pairing/fake_controller_pairing_controller.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'components/pairing') 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) && -- cgit v1.1