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

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

Issue 267433005: Provide IPConfigs in networkingPrivate.GetProperties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.cc ('k') | chromeos/dbus/shill_ipconfig_client.h » ('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_service_client.h" 5 #include "chromeos/dbus/fake_shill_service_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/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 DBusMethodCallStatus call_status; 82 DBusMethodCallStatus call_status;
83 stub_services_.GetDictionaryWithoutPathExpansion(service_path.value(), 83 stub_services_.GetDictionaryWithoutPathExpansion(service_path.value(),
84 &nested_dict); 84 &nested_dict);
85 if (nested_dict) { 85 if (nested_dict) {
86 result_properties.reset(nested_dict->DeepCopy()); 86 result_properties.reset(nested_dict->DeepCopy());
87 // Remove credentials that Shill wouldn't send. 87 // Remove credentials that Shill wouldn't send.
88 result_properties->RemoveWithoutPathExpansion(shill::kPassphraseProperty, 88 result_properties->RemoveWithoutPathExpansion(shill::kPassphraseProperty,
89 NULL); 89 NULL);
90 call_status = DBUS_METHOD_CALL_SUCCESS; 90 call_status = DBUS_METHOD_CALL_SUCCESS;
91 } else { 91 } else {
92 LOG(ERROR) << "Properties not found for: " << service_path.value(); 92 // This may happen if we remove services from the list.
93 VLOG(2) << "Properties not found for: " << service_path.value();
93 result_properties.reset(new base::DictionaryValue); 94 result_properties.reset(new base::DictionaryValue);
94 call_status = DBUS_METHOD_CALL_FAILURE; 95 call_status = DBUS_METHOD_CALL_FAILURE;
95 } 96 }
96 97
97 base::MessageLoop::current()->PostTask( 98 base::MessageLoop::current()->PostTask(
98 FROM_HERE, 99 FROM_HERE,
99 base::Bind(&PassStubServiceProperties, 100 base::Bind(&PassStubServiceProperties,
100 callback, 101 callback,
101 call_status, 102 call_status,
102 base::Owned(result_properties.release()))); 103 base::Owned(result_properties.release())));
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 base::StringValue(shill::kErrorBadPassphrase))); 557 base::StringValue(shill::kErrorBadPassphrase)));
557 } else { 558 } else {
558 // Set Online. 559 // Set Online.
559 SetServiceProperty(service_path, 560 SetServiceProperty(service_path,
560 shill::kStateProperty, 561 shill::kStateProperty,
561 base::StringValue(shill::kStateOnline)); 562 base::StringValue(shill::kStateOnline));
562 } 563 }
563 } 564 }
564 565
565 } // namespace chromeos 566 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.cc ('k') | chromeos/dbus/shill_ipconfig_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698