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

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

Issue 17034006: Add base namespace to more values in sync and elsewhere. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/shill_ipconfig_client_stub.h" 5 #include "chromeos/dbus/shill_ipconfig_client_stub.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 const VoidDBusMethodCallback& callback) { 66 const VoidDBusMethodCallback& callback) {
67 if (callback.is_null()) 67 if (callback.is_null())
68 return; 68 return;
69 base::DictionaryValue* dict = NULL; 69 base::DictionaryValue* dict = NULL;
70 if (ipconfigs_.GetDictionaryWithoutPathExpansion(ipconfig_path.value(), 70 if (ipconfigs_.GetDictionaryWithoutPathExpansion(ipconfig_path.value(),
71 &dict)) { 71 &dict)) {
72 // Update existing ip config stub object's properties. 72 // Update existing ip config stub object's properties.
73 dict->SetWithoutPathExpansion(name, value.DeepCopy()); 73 dict->SetWithoutPathExpansion(name, value.DeepCopy());
74 } else { 74 } else {
75 // Create a new stub ipconfig object, and update its properties. 75 // Create a new stub ipconfig object, and update its properties.
76 DictionaryValue* dvalue = new DictionaryValue; 76 base::DictionaryValue* dvalue = new base::DictionaryValue;
77 dvalue->SetWithoutPathExpansion(name, value.DeepCopy()); 77 dvalue->SetWithoutPathExpansion(name, value.DeepCopy());
78 ipconfigs_.SetWithoutPathExpansion(ipconfig_path.value(), 78 ipconfigs_.SetWithoutPathExpansion(ipconfig_path.value(),
79 dvalue); 79 dvalue);
80 } 80 }
81 base::MessageLoop::current()->PostTask( 81 base::MessageLoop::current()->PostTask(
82 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS)); 82 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS));
83 } 83 }
84 84
85 void ShillIPConfigClientStub::ClearProperty( 85 void ShillIPConfigClientStub::ClearProperty(
86 const dbus::ObjectPath& ipconfig_path, 86 const dbus::ObjectPath& ipconfig_path,
(...skipping 13 matching lines...) Expand all
100 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS)); 100 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS));
101 } 101 }
102 102
103 void ShillIPConfigClientStub::PassProperties( 103 void ShillIPConfigClientStub::PassProperties(
104 const base::DictionaryValue* values, 104 const base::DictionaryValue* values,
105 const DictionaryValueCallback& callback) const { 105 const DictionaryValueCallback& callback) const {
106 callback.Run(DBUS_METHOD_CALL_SUCCESS, *values); 106 callback.Run(DBUS_METHOD_CALL_SUCCESS, *values);
107 } 107 }
108 108
109 } // namespace chromeos 109 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/tools/build/generate_policy_source.py ('k') | chromeos/dbus/shill_manager_client_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698