| OLD | NEW |
| 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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 | 589 |
| 590 const bool add_to_visible = true; | 590 const bool add_to_visible = true; |
| 591 | 591 |
| 592 // IPConfigs | 592 // IPConfigs |
| 593 base::DictionaryValue ipconfig_v4_dictionary; | 593 base::DictionaryValue ipconfig_v4_dictionary; |
| 594 ipconfig_v4_dictionary.SetStringWithoutPathExpansion( | 594 ipconfig_v4_dictionary.SetStringWithoutPathExpansion( |
| 595 shill::kAddressProperty, "0.0.0.0"); | 595 shill::kAddressProperty, "0.0.0.0"); |
| 596 ipconfig_v4_dictionary.SetStringWithoutPathExpansion( | 596 ipconfig_v4_dictionary.SetStringWithoutPathExpansion( |
| 597 shill::kGatewayProperty, "0.0.0.1"); | 597 shill::kGatewayProperty, "0.0.0.1"); |
| 598 ipconfig_v4_dictionary.SetIntegerWithoutPathExpansion( | 598 ipconfig_v4_dictionary.SetIntegerWithoutPathExpansion( |
| 599 shill::kPrefixlenProperty, 0); | 599 shill::kPrefixlenProperty, 1); |
| 600 ipconfig_v4_dictionary.SetStringWithoutPathExpansion( | 600 ipconfig_v4_dictionary.SetStringWithoutPathExpansion( |
| 601 shill::kMethodProperty, shill::kTypeIPv4); | 601 shill::kMethodProperty, shill::kTypeIPv4); |
| 602 ip_configs->AddIPConfig("ipconfig_v4_path", ipconfig_v4_dictionary); | 602 ip_configs->AddIPConfig("ipconfig_v4_path", ipconfig_v4_dictionary); |
| 603 base::DictionaryValue ipconfig_v6_dictionary; | 603 base::DictionaryValue ipconfig_v6_dictionary; |
| 604 ipconfig_v6_dictionary.SetStringWithoutPathExpansion( | 604 ipconfig_v6_dictionary.SetStringWithoutPathExpansion( |
| 605 shill::kAddressProperty, "0:0:0:0:0:0:0:0"); | 605 shill::kAddressProperty, "0:0:0:0:0:0:0:0"); |
| 606 ipconfig_v6_dictionary.SetStringWithoutPathExpansion( | 606 ipconfig_v6_dictionary.SetStringWithoutPathExpansion( |
| 607 shill::kMethodProperty, shill::kTypeIPv6); | 607 shill::kMethodProperty, shill::kTypeIPv6); |
| 608 ip_configs->AddIPConfig("ipconfig_v6_path", ipconfig_v6_dictionary); | 608 ip_configs->AddIPConfig("ipconfig_v6_path", ipconfig_v6_dictionary); |
| 609 | 609 |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 *enabled = true; | 1101 *enabled = true; |
| 1102 if ((state == shill::kStatePortal && type != shill::kTypeWifi) || | 1102 if ((state == shill::kStatePortal && type != shill::kTypeWifi) || |
| 1103 (state == kNetworkActivated && type != shill::kTypeCellular)) { | 1103 (state == kNetworkActivated && type != shill::kTypeCellular)) { |
| 1104 LOG(WARNING) << "Invalid state: " << state << " for " << type; | 1104 LOG(WARNING) << "Invalid state: " << state << " for " << type; |
| 1105 return shill::kStateIdle; | 1105 return shill::kStateIdle; |
| 1106 } | 1106 } |
| 1107 return state; | 1107 return state; |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 } // namespace chromeos | 1110 } // namespace chromeos |
| OLD | NEW |