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

Side by Side Diff: chromeos/dbus/fake_shill_profile_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
« no previous file with comments | « chromeos/dbus/fake_shill_device_client.cc ('k') | chromeos/dbus/fake_shill_service_client.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 "chromeos/dbus/fake_shill_profile_client.h" 5 #include "chromeos/dbus/fake_shill_profile_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 23 matching lines...) Expand all
34 const base::DictionaryValue* dictionary) { 34 const base::DictionaryValue* dictionary) {
35 callback.Run(*dictionary); 35 callback.Run(*dictionary);
36 } 36 }
37 37
38 } // namespace 38 } // namespace
39 39
40 FakeShillProfileClient::FakeShillProfileClient() { 40 FakeShillProfileClient::FakeShillProfileClient() {
41 } 41 }
42 42
43 FakeShillProfileClient::~FakeShillProfileClient() { 43 FakeShillProfileClient::~FakeShillProfileClient() {
44 STLDeleteValues(&profiles_); 44 base::STLDeleteValues(&profiles_);
45 } 45 }
46 46
47 void FakeShillProfileClient::Init(dbus::Bus* bus) { 47 void FakeShillProfileClient::Init(dbus::Bus* bus) {
48 } 48 }
49 49
50 void FakeShillProfileClient::AddPropertyChangedObserver( 50 void FakeShillProfileClient::AddPropertyChangedObserver(
51 const dbus::ObjectPath& profile_path, 51 const dbus::ObjectPath& profile_path,
52 ShillPropertyChangedObserver* observer) { 52 ShillPropertyChangedObserver* observer) {
53 } 53 }
54 54
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 continue; 233 continue;
234 } 234 }
235 *profile_path = iter->first; 235 *profile_path = iter->first;
236 properties->MergeDictionary(entry); 236 properties->MergeDictionary(entry);
237 return true; 237 return true;
238 } 238 }
239 return false; 239 return false;
240 } 240 }
241 241
242 void FakeShillProfileClient::ClearProfiles() { 242 void FakeShillProfileClient::ClearProfiles() {
243 STLDeleteValues(&profiles_); 243 base::STLDeleteValues(&profiles_);
244 } 244 }
245 245
246 FakeShillProfileClient::ProfileProperties* FakeShillProfileClient::GetProfile( 246 FakeShillProfileClient::ProfileProperties* FakeShillProfileClient::GetProfile(
247 const dbus::ObjectPath& profile_path, 247 const dbus::ObjectPath& profile_path,
248 const ErrorCallback& error_callback) { 248 const ErrorCallback& error_callback) {
249 ProfileMap::const_iterator found = profiles_.find(profile_path.value()); 249 ProfileMap::const_iterator found = profiles_.find(profile_path.value());
250 if (found == profiles_.end()) { 250 if (found == profiles_.end()) {
251 if (!error_callback.is_null()) 251 if (!error_callback.is_null())
252 error_callback.Run("Error.InvalidProfile", "Invalid profile"); 252 error_callback.Run("Error.InvalidProfile", "Invalid profile");
253 return NULL; 253 return NULL;
254 } 254 }
255 255
256 return found->second; 256 return found->second;
257 } 257 }
258 258
259 } // namespace chromeos 259 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_shill_device_client.cc ('k') | chromeos/dbus/fake_shill_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698