| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/policy/device_status_collector.h" | 5 #include "chrome/browser/chromeos/policy/device_status_collector.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 fake_network.connection_status != shill::kStateDisconnect; | 1317 fake_network.connection_status != shill::kStateDisconnect; |
| 1318 service_client->AddService( | 1318 service_client->AddService( |
| 1319 fake_network.name, /* service_path */ | 1319 fake_network.name, /* service_path */ |
| 1320 fake_network.name /* guid */, | 1320 fake_network.name /* guid */, |
| 1321 fake_network.name /* name */, | 1321 fake_network.name /* name */, |
| 1322 fake_network.type /* type */, | 1322 fake_network.type /* type */, |
| 1323 fake_network.connection_status, | 1323 fake_network.connection_status, |
| 1324 is_visible); | 1324 is_visible); |
| 1325 service_client->SetServiceProperty( | 1325 service_client->SetServiceProperty( |
| 1326 fake_network.name, shill::kSignalStrengthProperty, | 1326 fake_network.name, shill::kSignalStrengthProperty, |
| 1327 base::FundamentalValue(fake_network.signal_strength)); | 1327 base::Value(fake_network.signal_strength)); |
| 1328 service_client->SetServiceProperty( | 1328 service_client->SetServiceProperty( |
| 1329 fake_network.name, shill::kDeviceProperty, | 1329 fake_network.name, shill::kDeviceProperty, |
| 1330 base::StringValue(fake_network.device_path)); | 1330 base::StringValue(fake_network.device_path)); |
| 1331 // Set the profile so this shows up as a configured network. | 1331 // Set the profile so this shows up as a configured network. |
| 1332 service_client->SetServiceProperty( | 1332 service_client->SetServiceProperty( |
| 1333 fake_network.name, shill::kProfileProperty, | 1333 fake_network.name, shill::kProfileProperty, |
| 1334 base::StringValue(fake_network.name)); | 1334 base::StringValue(fake_network.name)); |
| 1335 if (strlen(fake_network.address) > 0) { | 1335 if (strlen(fake_network.address) > 0) { |
| 1336 // Set the IP config. | 1336 // Set the IP config. |
| 1337 base::DictionaryValue ip_config_properties; | 1337 base::DictionaryValue ip_config_properties; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1354 // reported list of networks because it doesn't have a profile specified. | 1354 // reported list of networks because it doesn't have a profile specified. |
| 1355 service_client->AddService( | 1355 service_client->AddService( |
| 1356 kUnconfiguredNetwork.name, /* service_path */ | 1356 kUnconfiguredNetwork.name, /* service_path */ |
| 1357 kUnconfiguredNetwork.name /* guid */, | 1357 kUnconfiguredNetwork.name /* guid */, |
| 1358 kUnconfiguredNetwork.name /* name */, | 1358 kUnconfiguredNetwork.name /* name */, |
| 1359 kUnconfiguredNetwork.type /* type */, | 1359 kUnconfiguredNetwork.type /* type */, |
| 1360 kUnconfiguredNetwork.connection_status, | 1360 kUnconfiguredNetwork.connection_status, |
| 1361 true /* visible */); | 1361 true /* visible */); |
| 1362 service_client->SetServiceProperty( | 1362 service_client->SetServiceProperty( |
| 1363 kUnconfiguredNetwork.name, shill::kSignalStrengthProperty, | 1363 kUnconfiguredNetwork.name, shill::kSignalStrengthProperty, |
| 1364 base::FundamentalValue(kUnconfiguredNetwork.signal_strength)); | 1364 base::Value(kUnconfiguredNetwork.signal_strength)); |
| 1365 service_client->SetServiceProperty( | 1365 service_client->SetServiceProperty( |
| 1366 kUnconfiguredNetwork.name, shill::kDeviceProperty, | 1366 kUnconfiguredNetwork.name, shill::kDeviceProperty, |
| 1367 base::StringValue(kUnconfiguredNetwork.device_path)); | 1367 base::StringValue(kUnconfiguredNetwork.device_path)); |
| 1368 | 1368 |
| 1369 // Flush out pending state updates. | 1369 // Flush out pending state updates. |
| 1370 base::RunLoop().RunUntilIdle(); | 1370 base::RunLoop().RunUntilIdle(); |
| 1371 | 1371 |
| 1372 chromeos::NetworkStateHandler::NetworkStateList state_list; | 1372 chromeos::NetworkStateHandler::NetworkStateList state_list; |
| 1373 chromeos::NetworkStateHandler* network_state_handler = | 1373 chromeos::NetworkStateHandler* network_state_handler = |
| 1374 chromeos::NetworkHandler::Get()->network_state_handler(); | 1374 chromeos::NetworkHandler::Get()->network_state_handler(); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1486 AccountId::FromUserEmail(kPublicAccountId)); | 1486 AccountId::FromUserEmail(kPublicAccountId)); |
| 1487 EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount()) | 1487 EXPECT_CALL(*user_manager_, IsLoggedInAsPublicAccount()) |
| 1488 .WillRepeatedly(Return(true)); | 1488 .WillRepeatedly(Return(true)); |
| 1489 | 1489 |
| 1490 settings_helper_.SetBoolean(chromeos::kReportDeviceNetworkInterfaces, true); | 1490 settings_helper_.SetBoolean(chromeos::kReportDeviceNetworkInterfaces, true); |
| 1491 GetStatus(); | 1491 GetStatus(); |
| 1492 VerifyNetworkReporting(); | 1492 VerifyNetworkReporting(); |
| 1493 } | 1493 } |
| 1494 | 1494 |
| 1495 } // namespace policy | 1495 } // namespace policy |
| OLD | NEW |