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

Side by Side Diff: device/nfc/nfc_peer_chromeos.cc

Issue 2230083003: device: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « device/nfc/nfc_adapter.cc ('k') | device/nfc/nfc_tag_technology_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_peer_chromeos.h" 5 #include "device/nfc/nfc_peer_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 23 matching lines...) Expand all
34 GetRecordsForDevice(object_path_); 34 GetRecordsForDevice(object_path_);
35 for (ObjectPathVector::const_iterator iter = records.begin(); 35 for (ObjectPathVector::const_iterator iter = records.begin();
36 iter != records.end(); ++iter) { 36 iter != records.end(); ++iter) {
37 AddRecord(*iter); 37 AddRecord(*iter);
38 } 38 }
39 DBusThreadManager::Get()->GetNfcRecordClient()->AddObserver(this); 39 DBusThreadManager::Get()->GetNfcRecordClient()->AddObserver(this);
40 } 40 }
41 41
42 NfcPeerChromeOS::~NfcPeerChromeOS() { 42 NfcPeerChromeOS::~NfcPeerChromeOS() {
43 DBusThreadManager::Get()->GetNfcRecordClient()->RemoveObserver(this); 43 DBusThreadManager::Get()->GetNfcRecordClient()->RemoveObserver(this);
44 STLDeleteValues(&records_); 44 base::STLDeleteValues(&records_);
45 } 45 }
46 46
47 void NfcPeerChromeOS::AddObserver(device::NfcPeer::Observer* observer) { 47 void NfcPeerChromeOS::AddObserver(device::NfcPeer::Observer* observer) {
48 DCHECK(observer); 48 DCHECK(observer);
49 observers_.AddObserver(observer); 49 observers_.AddObserver(observer);
50 } 50 }
51 51
52 void NfcPeerChromeOS::RemoveObserver(device::NfcPeer::Observer* observer) { 52 void NfcPeerChromeOS::RemoveObserver(device::NfcPeer::Observer* observer) {
53 DCHECK(observer); 53 DCHECK(observer);
54 observers_.RemoveObserver(observer); 54 observers_.RemoveObserver(observer);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 return; 185 return;
186 } 186 }
187 187
188 message_.AddRecord(record); 188 message_.AddRecord(record);
189 records_[object_path] = record; 189 records_[object_path] = record;
190 FOR_EACH_OBSERVER(NfcPeer::Observer, observers_, 190 FOR_EACH_OBSERVER(NfcPeer::Observer, observers_,
191 RecordReceived(this, record)); 191 RecordReceived(this, record));
192 } 192 }
193 193
194 } // namespace chromeos 194 } // namespace chromeos
OLDNEW
« no previous file with comments | « device/nfc/nfc_adapter.cc ('k') | device/nfc/nfc_tag_technology_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698