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

Side by Side Diff: chromeos/dbus/fake_shill_device_client.cc

Issue 2229383003: chromeos: 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
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 "chromeos/dbus/fake_shill_device_client.h" 5 #include "chromeos/dbus/fake_shill_device_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 const char FakeShillDeviceClient::kDefaultSimPin[] = "1111"; 60 const char FakeShillDeviceClient::kDefaultSimPin[] = "1111";
61 const int FakeShillDeviceClient::kSimPinRetryCount = 3; 61 const int FakeShillDeviceClient::kSimPinRetryCount = 3;
62 62
63 FakeShillDeviceClient::FakeShillDeviceClient() 63 FakeShillDeviceClient::FakeShillDeviceClient()
64 : initial_tdls_busy_count_(0), 64 : initial_tdls_busy_count_(0),
65 tdls_busy_count_(0), 65 tdls_busy_count_(0),
66 weak_ptr_factory_(this) {} 66 weak_ptr_factory_(this) {}
67 67
68 FakeShillDeviceClient::~FakeShillDeviceClient() { 68 FakeShillDeviceClient::~FakeShillDeviceClient() {
69 STLDeleteContainerPairSecondPointers( 69 base::STLDeleteContainerPairSecondPointers(observer_list_.begin(),
70 observer_list_.begin(), observer_list_.end()); 70 observer_list_.end());
71 } 71 }
72 72
73 // ShillDeviceClient overrides. 73 // ShillDeviceClient overrides.
74 74
75 void FakeShillDeviceClient::Init(dbus::Bus* bus) {} 75 void FakeShillDeviceClient::Init(dbus::Bus* bus) {}
76 76
77 void FakeShillDeviceClient::AddPropertyChangedObserver( 77 void FakeShillDeviceClient::AddPropertyChangedObserver(
78 const dbus::ObjectPath& device_path, 78 const dbus::ObjectPath& device_path,
79 ShillPropertyChangedObserver* observer) { 79 ShillPropertyChangedObserver* observer) {
80 GetObserverList(device_path).AddObserver(observer); 80 GetObserverList(device_path).AddObserver(observer);
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 std::map<dbus::ObjectPath, PropertyObserverList*>::iterator iter = 627 std::map<dbus::ObjectPath, PropertyObserverList*>::iterator iter =
628 observer_list_.find(device_path); 628 observer_list_.find(device_path);
629 if (iter != observer_list_.end()) 629 if (iter != observer_list_.end())
630 return *(iter->second); 630 return *(iter->second);
631 PropertyObserverList* observer_list = new PropertyObserverList(); 631 PropertyObserverList* observer_list = new PropertyObserverList();
632 observer_list_[device_path] = observer_list; 632 observer_list_[device_path] = observer_list;
633 return *observer_list; 633 return *observer_list;
634 } 634 }
635 635
636 } // namespace chromeos 636 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/audio/audio_devices_pref_handler_stub.cc ('k') | chromeos/dbus/fake_shill_profile_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698