Chromium Code Reviews| Index: components/pairing/fake_controller_pairing_controller.cc |
| diff --git a/components/pairing/fake_controller_pairing_controller.cc b/components/pairing/fake_controller_pairing_controller.cc |
| index 0b05ee6a9e5c61f0b83bd0c3a0ae7b0d982a1034..3ea6a3ce3777b13f02e8f5a033b79052587e543c 100644 |
| --- a/components/pairing/fake_controller_pairing_controller.cc |
| +++ b/components/pairing/fake_controller_pairing_controller.cc |
| @@ -82,11 +82,9 @@ void FakeControllerPairingController::ApplyConfig(const std::string& config) { |
| base::SplitStringIntoKeyValuePairs(dict["discovery"], '-', '~', &events)) |
| << "Wrong 'discovery' format."; |
| DiscoveryScenario scenario; |
| - for (base::StringPairs::const_iterator event = events.begin(); |
| - event != events.end(); |
| - ++event) { |
| - std::string type = event->first; |
| - std::string device_id = event->second; |
| + for (const auto& event : events) { |
| + std::string type = event.first; |
|
achuithb
2014/10/02 21:09:54
let's avoid the copy and make these const std::str
Zachary Kuznia
2014/10/02 21:25:16
Done.
|
| + std::string device_id = event.second; |
| CHECK(type == "F" || type == "L" || type == "N") |
| << "Wrong discovery event type."; |
| CHECK(!device_id.empty() || type == "N") << "Empty device ID."; |