OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 } | 125 } |
126 const std::string& path; | 126 const std::string& path; |
127 }; | 127 }; |
128 | 128 |
129 const std::string& name() const { return name_; } | 129 const std::string& name() const { return name_; } |
130 int strength() const { return strength_; } | 130 int strength() const { return strength_; } |
131 bool auto_connect() const { return auto_connect_; } | 131 bool auto_connect() const { return auto_connect_; } |
132 bool favorite() const { return favorite_; } | 132 bool favorite() const { return favorite_; } |
133 | 133 |
134 void set_auto_connect(bool auto_connect) { auto_connect_ = auto_connect; } | 134 void set_auto_connect(bool auto_connect) { auto_connect_ = auto_connect; } |
135 void set_favorite(bool favorite) { favorite_ = favorite; } | 135 // We don't have a setter for |favorite_| because to unfavorite a network is |
| 136 // equivalent to forget a network, so we call forget network on cros for |
| 137 // that. See ForgetWifiNetwork(). |
136 | 138 |
137 // Network overrides. | 139 // Network overrides. |
138 virtual void Clear(); | 140 virtual void Clear(); |
139 | 141 |
140 protected: | 142 protected: |
141 WirelessNetwork() | 143 WirelessNetwork() |
142 : Network(), | 144 : Network(), |
143 strength_(0), | 145 strength_(0), |
144 auto_connect_(false), | 146 auto_connect_(false), |
145 favorite_(false) {} | 147 favorite_(false) {} |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 virtual std::string GetHtmlInfo(int refresh) = 0; | 586 virtual std::string GetHtmlInfo(int refresh) = 0; |
585 | 587 |
586 // Factory function, creates a new instance and returns ownership. | 588 // Factory function, creates a new instance and returns ownership. |
587 // For normal usage, access the singleton via CrosLibrary::Get(). | 589 // For normal usage, access the singleton via CrosLibrary::Get(). |
588 static NetworkLibrary* GetImpl(bool stub); | 590 static NetworkLibrary* GetImpl(bool stub); |
589 }; | 591 }; |
590 | 592 |
591 } // namespace chromeos | 593 } // namespace chromeos |
592 | 594 |
593 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 595 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
OLD | NEW |