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

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

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 | « chrome/test/chromedriver/window_commands.cc ('k') | chromeos/dbus/fake_shill_manager_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_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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 return; 259 return;
260 } 260 }
261 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); 261 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback);
262 } 262 }
263 263
264 void FakeShillDeviceClient::SetCarrier(const dbus::ObjectPath& device_path, 264 void FakeShillDeviceClient::SetCarrier(const dbus::ObjectPath& device_path,
265 const std::string& carrier, 265 const std::string& carrier,
266 const base::Closure& callback, 266 const base::Closure& callback,
267 const ErrorCallback& error_callback) { 267 const ErrorCallback& error_callback) {
268 SetPropertyInternal(device_path, shill::kCarrierProperty, 268 SetPropertyInternal(device_path, shill::kCarrierProperty,
269 base::StringValue(carrier), callback, error_callback); 269 base::Value(carrier), callback, error_callback);
270 } 270 }
271 271
272 void FakeShillDeviceClient::Reset(const dbus::ObjectPath& device_path, 272 void FakeShillDeviceClient::Reset(const dbus::ObjectPath& device_path,
273 const base::Closure& callback, 273 const base::Closure& callback,
274 const ErrorCallback& error_callback) { 274 const ErrorCallback& error_callback) {
275 if (!stub_devices_.HasKey(device_path.value())) { 275 if (!stub_devices_.HasKey(device_path.value())) {
276 PostNotFoundError(error_callback); 276 PostNotFoundError(error_callback);
277 return; 277 return;
278 } 278 }
279 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); 279 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback);
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 FakeShillDeviceClient::GetObserverList(const dbus::ObjectPath& device_path) { 623 FakeShillDeviceClient::GetObserverList(const dbus::ObjectPath& device_path) {
624 auto iter = observer_list_.find(device_path); 624 auto iter = observer_list_.find(device_path);
625 if (iter != observer_list_.end()) 625 if (iter != observer_list_.end())
626 return *(iter->second); 626 return *(iter->second);
627 PropertyObserverList* observer_list = new PropertyObserverList(); 627 PropertyObserverList* observer_list = new PropertyObserverList();
628 observer_list_[device_path] = base::WrapUnique(observer_list); 628 observer_list_[device_path] = base::WrapUnique(observer_list);
629 return *observer_list; 629 return *observer_list;
630 } 630 }
631 631
632 } // namespace chromeos 632 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/window_commands.cc ('k') | chromeos/dbus/fake_shill_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698