| 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 "base/environment.h" | 7 #include "base/environment.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/prefs/pref_service.h" | 11 #include "base/prefs/pref_service.h" |
| 12 #include "base/prefs/testing_pref_service.h" | 12 #include "base/prefs/testing_pref_service.h" |
| 13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 14 #include "base/threading/sequenced_worker_pool.h" | 14 #include "base/threading/sequenced_worker_pool.h" |
| 15 #include "chrome/browser/chromeos/login/mock_user_manager.h" | 15 #include "chrome/browser/chromeos/login/mock_user_manager.h" |
| 16 #include "chrome/browser/chromeos/login/user_manager.h" | 16 #include "chrome/browser/chromeos/login/user_manager.h" |
| 17 #include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h" | 17 #include "chrome/browser/chromeos/policy/stub_enterprise_install_attributes.h" |
| 18 #include "chrome/browser/chromeos/settings/cros_settings.h" | 18 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 19 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 19 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 20 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" | 20 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" |
| 21 #include "chrome/browser/policy/browser_policy_connector.h" | 21 #include "chrome/browser/policy/browser_policy_connector.h" |
| 22 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" | |
| 23 #include "chrome/common/pref_names.h" | 22 #include "chrome/common/pref_names.h" |
| 24 #include "chrome/test/base/testing_browser_process.h" | 23 #include "chrome/test/base/testing_browser_process.h" |
| 25 #include "chromeos/dbus/dbus_thread_manager.h" | 24 #include "chromeos/dbus/dbus_thread_manager.h" |
| 26 #include "chromeos/dbus/shill_device_client.h" | 25 #include "chromeos/dbus/shill_device_client.h" |
| 27 #include "chromeos/network/network_handler.h" | 26 #include "chromeos/network/network_handler.h" |
| 28 #include "chromeos/settings/cros_settings_names.h" | 27 #include "chromeos/settings/cros_settings_names.h" |
| 29 #include "chromeos/settings/cros_settings_provider.h" | 28 #include "chromeos/settings/cros_settings_provider.h" |
| 30 #include "chromeos/system/mock_statistics_provider.h" | 29 #include "chromeos/system/mock_statistics_provider.h" |
| 31 #include "content/public/browser/browser_thread.h" | 30 #include "content/public/browser/browser_thread.h" |
| 32 #include "content/public/browser/geolocation_provider.h" | 31 #include "content/public/browser/geolocation_provider.h" |
| 33 #include "content/public/test/test_browser_thread.h" | 32 #include "content/public/test/test_browser_thread.h" |
| 34 #include "content/public/test/test_utils.h" | 33 #include "content/public/test/test_utils.h" |
| 34 #include "policy/proto/device_management_backend.pb.h" |
| 35 #include "testing/gmock/include/gmock/gmock.h" | 35 #include "testing/gmock/include/gmock/gmock.h" |
| 36 #include "testing/gtest/include/gtest/gtest.h" | 36 #include "testing/gtest/include/gtest/gtest.h" |
| 37 #include "third_party/cros_system_api/dbus/service_constants.h" | 37 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 38 | 38 |
| 39 using ::testing::DoAll; | 39 using ::testing::DoAll; |
| 40 using ::testing::NotNull; | 40 using ::testing::NotNull; |
| 41 using ::testing::Return; | 41 using ::testing::Return; |
| 42 using ::testing::SetArgPointee; | 42 using ::testing::SetArgPointee; |
| 43 using ::testing::_; | 43 using ::testing::_; |
| 44 using base::Time; | 44 using base::Time; |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 } | 768 } |
| 769 | 769 |
| 770 EXPECT_TRUE(found_match) << "No matching interface for fake device " << i; | 770 EXPECT_TRUE(found_match) << "No matching interface for fake device " << i; |
| 771 count++; | 771 count++; |
| 772 } | 772 } |
| 773 | 773 |
| 774 EXPECT_EQ(count, status_.network_interface_size()); | 774 EXPECT_EQ(count, status_.network_interface_size()); |
| 775 } | 775 } |
| 776 | 776 |
| 777 } // namespace policy | 777 } // namespace policy |
| OLD | NEW |