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

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

Issue 280023003: Implement networkingPrivate.getNetworks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nonchromeos 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_manager_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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 SortManagerServices(); 383 SortManagerServices();
384 384
385 if (!profile_path.empty()) { 385 if (!profile_path.empty()) {
386 DBusThreadManager::Get()->GetShillProfileClient()->GetTestInterface()-> 386 DBusThreadManager::Get()->GetShillProfileClient()->GetTestInterface()->
387 UpdateService(profile_path, service_path); 387 UpdateService(profile_path, service_path);
388 } 388 }
389 } 389 }
390 390
391 void FakeShillServiceClient::RemoveService(const std::string& service_path) { 391 void FakeShillServiceClient::RemoveService(const std::string& service_path) {
392 DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()-> 392 DBusThreadManager::Get()->GetShillManagerClient()->GetTestInterface()->
393 RemoveManagerService(service_path); 393 RemoveManagerService(service_path, true);
394 394
395 stub_services_.RemoveWithoutPathExpansion(service_path, NULL); 395 stub_services_.RemoveWithoutPathExpansion(service_path, NULL);
396 connect_behavior_.erase(service_path); 396 connect_behavior_.erase(service_path);
397 } 397 }
398 398
399 bool FakeShillServiceClient::SetServiceProperty(const std::string& service_path, 399 bool FakeShillServiceClient::SetServiceProperty(const std::string& service_path,
400 const std::string& property, 400 const std::string& property,
401 const base::Value& value) { 401 const base::Value& value) {
402 base::DictionaryValue* dict = NULL; 402 base::DictionaryValue* dict = NULL;
403 if (!stub_services_.GetDictionaryWithoutPathExpansion(service_path, &dict)) 403 if (!stub_services_.GetDictionaryWithoutPathExpansion(service_path, &dict))
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 base::StringValue(shill::kErrorBadPassphrase))); 610 base::StringValue(shill::kErrorBadPassphrase)));
611 } else { 611 } else {
612 // Set Online. 612 // Set Online.
613 SetServiceProperty(service_path, 613 SetServiceProperty(service_path,
614 shill::kStateProperty, 614 shill::kStateProperty,
615 base::StringValue(shill::kStateOnline)); 615 base::StringValue(shill::kStateOnline));
616 } 616 }
617 } 617 }
618 618
619 } // namespace chromeos 619 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_shill_manager_client.cc ('k') | chromeos/dbus/shill_manager_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698