| 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 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
| 17 #include "base/memory/singleton.h" | 17 #include "base/memory/singleton.h" |
| 18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
| 19 #include "base/string16.h" | 19 #include "base/string16.h" |
| 20 #include "base/timer.h" | 20 #include "base/timer.h" |
| 21 #include "chrome/browser/chromeos/cros/network_ui_data.h" |
| 21 #include "third_party/cros/chromeos_network.h" | 22 #include "third_party/cros/chromeos_network.h" |
| 22 | 23 |
| 23 namespace base { | 24 namespace base { |
| 24 class DictionaryValue; | 25 class DictionaryValue; |
| 25 class Value; | 26 class Value; |
| 26 } | 27 } |
| 27 | 28 |
| 28 namespace chromeos { | 29 namespace chromeos { |
| 29 | 30 |
| 30 class NetworkDeviceParser; | 31 class NetworkDeviceParser; |
| (...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1783 // If nothing is changed, this method does nothing. | 1784 // If nothing is changed, this method does nothing. |
| 1784 virtual void SetIPConfig(const NetworkIPConfig& ipconfig) = 0; | 1785 virtual void SetIPConfig(const NetworkIPConfig& ipconfig) = 0; |
| 1785 | 1786 |
| 1786 // This will connect to a preferred network if the currently connected | 1787 // This will connect to a preferred network if the currently connected |
| 1787 // network is not preferred. This should be called when the active profile | 1788 // network is not preferred. This should be called when the active profile |
| 1788 // changes. | 1789 // changes. |
| 1789 virtual void SwitchToPreferredNetwork() = 0; | 1790 virtual void SwitchToPreferredNetwork() = 0; |
| 1790 | 1791 |
| 1791 // Load networks from an Open Network Configuration blob. | 1792 // Load networks from an Open Network Configuration blob. |
| 1792 virtual bool LoadOncNetworks(const std::string& onc_blob, | 1793 virtual bool LoadOncNetworks(const std::string& onc_blob, |
| 1793 const std::string& passcode) = 0; | 1794 const std::string& passcode, |
| 1795 NetworkUIData::ONCSource source) = 0; |
| 1794 | 1796 |
| 1795 // This sets the active network for the network type. Note: priority order | 1797 // This sets the active network for the network type. Note: priority order |
| 1796 // is unchanged (i.e. if a wifi network is set to active, but an ethernet | 1798 // is unchanged (i.e. if a wifi network is set to active, but an ethernet |
| 1797 // network is still active, active_network() will still return the ethernet | 1799 // network is still active, active_network() will still return the ethernet |
| 1798 // network). Other networks of the same type will become inactive. | 1800 // network). Other networks of the same type will become inactive. |
| 1799 // Used for testing. | 1801 // Used for testing. |
| 1800 virtual bool SetActiveNetwork(ConnectionType type, | 1802 virtual bool SetActiveNetwork(ConnectionType type, |
| 1801 const std::string& service_path) = 0; | 1803 const std::string& service_path) = 0; |
| 1802 | 1804 |
| 1803 // Factory function, creates a new instance and returns ownership. | 1805 // Factory function, creates a new instance and returns ownership. |
| 1804 // For normal usage, access the singleton via CrosLibrary::Get(). | 1806 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 1805 static NetworkLibrary* GetImpl(bool stub); | 1807 static NetworkLibrary* GetImpl(bool stub); |
| 1806 }; | 1808 }; |
| 1807 | 1809 |
| 1808 } // namespace chromeos | 1810 } // namespace chromeos |
| 1809 | 1811 |
| 1810 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 1812 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| OLD | NEW |