| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "device/nfc/nfc_adapter.h" | 5 #include "device/nfc/nfc_adapter.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "device/nfc/nfc_peer.h" | 8 #include "device/nfc/nfc_peer.h" |
| 9 #include "device/nfc/nfc_tag.h" | 9 #include "device/nfc/nfc_tag.h" |
| 10 | 10 |
| 11 namespace device { | 11 namespace device { |
| 12 | 12 |
| 13 NfcAdapter::NfcAdapter() { | 13 NfcAdapter::NfcAdapter() { |
| 14 } | 14 } |
| 15 | 15 |
| 16 NfcAdapter::~NfcAdapter() { | 16 NfcAdapter::~NfcAdapter() { |
| 17 STLDeleteValues(&peers_); | 17 base::STLDeleteValues(&peers_); |
| 18 STLDeleteValues(&tags_); | 18 base::STLDeleteValues(&tags_); |
| 19 } | 19 } |
| 20 | 20 |
| 21 void NfcAdapter::GetPeers(PeerList* peer_list) const { | 21 void NfcAdapter::GetPeers(PeerList* peer_list) const { |
| 22 peer_list->clear(); | 22 peer_list->clear(); |
| 23 for (PeersMap::const_iterator iter = peers_.begin(); | 23 for (PeersMap::const_iterator iter = peers_.begin(); |
| 24 iter != peers_.end(); ++iter) { | 24 iter != peers_.end(); ++iter) { |
| 25 peer_list->push_back(iter->second); | 25 peer_list->push_back(iter->second); |
| 26 } | 26 } |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 void NfcAdapter::ClearTags() { | 89 void NfcAdapter::ClearTags() { |
| 90 tags_.clear(); | 90 tags_.clear(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void NfcAdapter::ClearPeers() { | 93 void NfcAdapter::ClearPeers() { |
| 94 peers_.clear(); | 94 peers_.clear(); |
| 95 } | 95 } |
| 96 | 96 |
| 97 } // namespace device | 97 } // namespace device |
| OLD | NEW |