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 #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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 // network is not preferred. This should be called when the active profile | 1683 // network is not preferred. This should be called when the active profile |
1684 // changes. | 1684 // changes. |
1685 virtual void SwitchToPreferredNetwork() = 0; | 1685 virtual void SwitchToPreferredNetwork() = 0; |
1686 | 1686 |
1687 // Load networks from an Open Network Configuration blob. | 1687 // Load networks from an Open Network Configuration blob. |
1688 // If there was an error, this will return false and |error| will be set to | 1688 // If there was an error, this will return false and |error| will be set to |
1689 // the error message. | 1689 // the error message. |
1690 virtual bool LoadOncNetworks(const std::string& onc_blob, | 1690 virtual bool LoadOncNetworks(const std::string& onc_blob, |
1691 const std::string& passcode, | 1691 const std::string& passcode, |
1692 NetworkUIData::ONCSource source, | 1692 NetworkUIData::ONCSource source, |
1693 bool allow_web_trust_from_policy, | 1693 bool allow_web_trust_from_policy) = 0; |
1694 std::string* error) = 0; | |
1695 | 1694 |
1696 // This sets the active network for the network type. Note: priority order | 1695 // This sets the active network for the network type. Note: priority order |
1697 // is unchanged (i.e. if a wifi network is set to active, but an ethernet | 1696 // is unchanged (i.e. if a wifi network is set to active, but an ethernet |
1698 // network is still active, active_network() will still return the ethernet | 1697 // network is still active, active_network() will still return the ethernet |
1699 // network). Other networks of the same type will become inactive. | 1698 // network). Other networks of the same type will become inactive. |
1700 // Used for testing. | 1699 // Used for testing. |
1701 virtual bool SetActiveNetwork(ConnectionType type, | 1700 virtual bool SetActiveNetwork(ConnectionType type, |
1702 const std::string& service_path) = 0; | 1701 const std::string& service_path) = 0; |
1703 | 1702 |
1704 // Factory function, creates a new instance and returns ownership. | 1703 // Factory function, creates a new instance and returns ownership. |
1705 // For normal usage, access the singleton via CrosLibrary::Get(). | 1704 // For normal usage, access the singleton via CrosLibrary::Get(). |
1706 static NetworkLibrary* GetImpl(bool stub); | 1705 static NetworkLibrary* GetImpl(bool stub); |
1707 }; | 1706 }; |
1708 | 1707 |
1709 } // namespace chromeos | 1708 } // namespace chromeos |
1710 | 1709 |
1711 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 1710 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
OLD | NEW |