OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/cros/network_library.h" | 5 #include "chrome/browser/chromeos/cros/network_library.h" |
6 | 6 |
7 #include <dbus/dbus-glib.h> | 7 #include <dbus/dbus-glib.h> |
8 #include <dbus/dbus-gtype-specialized.h> | 8 #include <dbus/dbus-gtype-specialized.h> |
9 #include <glib-object.h> | 9 #include <glib-object.h> |
10 | 10 |
(...skipping 4778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4789 // If these change, the expectations in network_library_unittest and | 4789 // If these change, the expectations in network_library_unittest and |
4790 // network_menu_icon_unittest need to be changed also. | 4790 // network_menu_icon_unittest need to be changed also. |
4791 | 4791 |
4792 // Networks are added in priority order. | 4792 // Networks are added in priority order. |
4793 network_priority_order_ = 0; | 4793 network_priority_order_ = 0; |
4794 | 4794 |
4795 Network* ethernet = new EthernetNetwork("eth1"); | 4795 Network* ethernet = new EthernetNetwork("eth1"); |
4796 ethernet->set_name("Fake Ethernet"); | 4796 ethernet->set_name("Fake Ethernet"); |
4797 ethernet->set_is_active(true); | 4797 ethernet->set_is_active(true); |
4798 ethernet->set_connected(true); | 4798 ethernet->set_connected(true); |
4799 AddStubNetwork(ethernet, PROFILE_NONE); | 4799 AddStubNetwork(ethernet, PROFILE_SHARED); |
4800 | 4800 |
4801 WifiNetwork* wifi1 = new WifiNetwork("wifi1"); | 4801 WifiNetwork* wifi1 = new WifiNetwork("wifi1"); |
4802 wifi1->set_name("Fake WiFi1"); | 4802 wifi1->set_name("Fake WiFi1"); |
4803 wifi1->set_strength(100); | 4803 wifi1->set_strength(100); |
4804 wifi1->set_connected(true); | 4804 wifi1->set_connected(true); |
4805 wifi1->set_encryption(SECURITY_NONE); | 4805 wifi1->set_encryption(SECURITY_NONE); |
4806 AddStubNetwork(wifi1, PROFILE_NONE); | 4806 AddStubNetwork(wifi1, PROFILE_SHARED); |
stevenjb
2011/10/18 22:47:33
This should be fine, but you will want to make sur
kuan
2011/10/19 00:12:30
Done. i ran unit_tests with --gtest_filter=*Networ
| |
4807 | 4807 |
4808 WifiNetwork* wifi2 = new WifiNetwork("wifi2"); | 4808 WifiNetwork* wifi2 = new WifiNetwork("wifi2"); |
4809 wifi2->set_name("Fake WiFi2"); | 4809 wifi2->set_name("Fake WiFi2"); |
4810 wifi2->set_strength(70); | 4810 wifi2->set_strength(70); |
4811 wifi2->set_encryption(SECURITY_NONE); | 4811 wifi2->set_encryption(SECURITY_NONE); |
4812 AddStubNetwork(wifi2, PROFILE_SHARED); | 4812 AddStubNetwork(wifi2, PROFILE_SHARED); |
4813 | 4813 |
4814 WifiNetwork* wifi3 = new WifiNetwork("wifi3"); | 4814 WifiNetwork* wifi3 = new WifiNetwork("wifi3"); |
4815 wifi3->set_name("Fake WiFi3 Encrypted with a long name"); | 4815 wifi3->set_name("Fake WiFi3 Encrypted with a long name"); |
4816 wifi3->set_strength(60); | 4816 wifi3->set_strength(60); |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5142 return impl; | 5142 return impl; |
5143 } | 5143 } |
5144 | 5144 |
5145 ///////////////////////////////////////////////////////////////////////////// | 5145 ///////////////////////////////////////////////////////////////////////////// |
5146 | 5146 |
5147 } // namespace chromeos | 5147 } // namespace chromeos |
5148 | 5148 |
5149 // Allows InvokeLater without adding refcounting. This class is a Singleton and | 5149 // Allows InvokeLater without adding refcounting. This class is a Singleton and |
5150 // won't be deleted until its last InvokeLater is run. | 5150 // won't be deleted until its last InvokeLater is run. |
5151 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::NetworkLibraryImplBase); | 5151 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::NetworkLibraryImplBase); |
OLD | NEW |