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

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

Issue 471183002: Migrate Slot ID of client certs in network configuration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ethernet EAP. Created 6 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 | Annotate | Revision Log
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_manager_client.h" 5 #include "chromeos/dbus/fake_shill_manager_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 // Default service is no longer connected; clear. 490 // Default service is no longer connected; clear.
491 default_service_.clear(); 491 default_service_.clear();
492 base::StringValue default_service_value(default_service_); 492 base::StringValue default_service_value(default_service_);
493 SetManagerProperty(shill::kDefaultServiceProperty, default_service_value); 493 SetManagerProperty(shill::kDefaultServiceProperty, default_service_value);
494 } 494 }
495 } 495 }
496 496
497 void FakeShillManagerClient::SortManagerServices(bool notify) { 497 void FakeShillManagerClient::SortManagerServices(bool notify) {
498 DVLOG(1) << "SortManagerServices"; 498 DVLOG(1) << "SortManagerServices";
499 static const char* ordered_types[] = {shill::kTypeEthernet, 499 static const char* ordered_types[] = {shill::kTypeEthernet,
500 shill::kTypeEthernetEap,
500 shill::kTypeWifi, 501 shill::kTypeWifi,
501 shill::kTypeCellular, 502 shill::kTypeCellular,
502 shill::kTypeWimax, 503 shill::kTypeWimax,
503 shill::kTypeVPN}; 504 shill::kTypeVPN};
504 505
505 base::ListValue* complete_list = 506 base::ListValue* complete_list =
506 GetListProperty(shill::kServiceCompleteListProperty); 507 GetListProperty(shill::kServiceCompleteListProperty);
507 if (complete_list->empty()) 508 if (complete_list->empty())
508 return; 509 return;
509 scoped_ptr<base::ListValue> prev_complete_list(complete_list->DeepCopy()); 510 scoped_ptr<base::ListValue> prev_complete_list(complete_list->DeepCopy());
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 property, &list_property)) { 870 property, &list_property)) {
870 list_property = new base::ListValue; 871 list_property = new base::ListValue;
871 stub_properties_.SetWithoutPathExpansion(property, list_property); 872 stub_properties_.SetWithoutPathExpansion(property, list_property);
872 } 873 }
873 return list_property; 874 return list_property;
874 } 875 }
875 876
876 bool FakeShillManagerClient::TechnologyEnabled(const std::string& type) const { 877 bool FakeShillManagerClient::TechnologyEnabled(const std::string& type) const {
877 if (type == shill::kTypeVPN) 878 if (type == shill::kTypeVPN)
878 return true; // VPN is always "enabled" since there is no associated device 879 return true; // VPN is always "enabled" since there is no associated device
880 if (type == shill::kTypeEthernetEap)
881 return true;
879 bool enabled = false; 882 bool enabled = false;
880 const base::ListValue* technologies; 883 const base::ListValue* technologies;
881 if (stub_properties_.GetListWithoutPathExpansion( 884 if (stub_properties_.GetListWithoutPathExpansion(
882 shill::kEnabledTechnologiesProperty, &technologies)) { 885 shill::kEnabledTechnologiesProperty, &technologies)) {
883 base::StringValue type_value(type); 886 base::StringValue type_value(type);
884 if (technologies->Find(type_value) != technologies->end()) 887 if (technologies->Find(type_value) != technologies->end())
885 enabled = true; 888 enabled = true;
886 } 889 }
887 return enabled; 890 return enabled;
888 } 891 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 *enabled = true; 1079 *enabled = true;
1077 if ((state == shill::kStatePortal && type != shill::kTypeWifi) || 1080 if ((state == shill::kStatePortal && type != shill::kTypeWifi) ||
1078 (state == kNetworkActivated && type != shill::kTypeCellular)) { 1081 (state == kNetworkActivated && type != shill::kTypeCellular)) {
1079 LOG(WARNING) << "Invalid state: " << state << " for " << type; 1082 LOG(WARNING) << "Invalid state: " << state << " for " << type;
1080 return shill::kStateIdle; 1083 return shill::kStateIdle;
1081 } 1084 }
1082 return state; 1085 return state;
1083 } 1086 }
1084 1087
1085 } // namespace chromeos 1088 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/wifi_config_view.cc ('k') | chromeos/network/client_cert_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698