| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 bool added() const { return added_; } | 614 bool added() const { return added_; } |
| 615 bool notify_failure() const { return notify_failure_; } | 615 bool notify_failure() const { return notify_failure_; } |
| 616 const std::string& profile_path() const { return profile_path_; } | 616 const std::string& profile_path() const { return profile_path_; } |
| 617 NetworkProfileType profile_type() const { return profile_type_; } | 617 NetworkProfileType profile_type() const { return profile_type_; } |
| 618 | 618 |
| 619 const std::string& unique_id() const { return unique_id_; } | 619 const std::string& unique_id() const { return unique_id_; } |
| 620 int priority_order() const { return priority_order_; } | 620 int priority_order() const { return priority_order_; } |
| 621 | 621 |
| 622 const std::string& proxy_config() const { return proxy_config_; } | 622 const std::string& proxy_config() const { return proxy_config_; } |
| 623 | 623 |
| 624 const DictionaryValue* ui_data() const { return &ui_data_; } |
| 625 DictionaryValue* ui_data() { return &ui_data_; } |
| 626 |
| 624 void set_notify_failure(bool state) { notify_failure_ = state; } | 627 void set_notify_failure(bool state) { notify_failure_ = state; } |
| 625 | 628 |
| 626 void SetPreferred(bool preferred); | 629 void SetPreferred(bool preferred); |
| 627 | 630 |
| 628 void SetAutoConnect(bool auto_connect); | 631 void SetAutoConnect(bool auto_connect); |
| 629 | 632 |
| 630 void SetName(const std::string& name); | 633 void SetName(const std::string& name); |
| 631 | 634 |
| 632 void SetSaveCredentials(bool save_credentials); | 635 void SetSaveCredentials(bool save_credentials); |
| 633 | 636 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 virtual void SetIntegerProperty(const char* prop, int i, int* dest); | 697 virtual void SetIntegerProperty(const char* prop, int i, int* dest); |
| 695 virtual void SetValueProperty(const char* prop, base::Value* val); | 698 virtual void SetValueProperty(const char* prop, base::Value* val); |
| 696 virtual void ClearProperty(const char* prop); | 699 virtual void ClearProperty(const char* prop); |
| 697 | 700 |
| 698 // This will clear the property if string is empty. Otherwise, it will set it. | 701 // This will clear the property if string is empty. Otherwise, it will set it. |
| 699 virtual void SetOrClearStringProperty(const char* prop, | 702 virtual void SetOrClearStringProperty(const char* prop, |
| 700 const std::string& str, | 703 const std::string& str, |
| 701 std::string* dest); | 704 std::string* dest); |
| 702 | 705 |
| 703 void set_unique_id(const std::string& unique_id) { unique_id_ = unique_id; } | 706 void set_unique_id(const std::string& unique_id) { unique_id_ = unique_id; } |
| 704 DictionaryValue* ui_data() { return &ui_data_; } | |
| 705 | 707 |
| 706 private: | 708 private: |
| 707 // This allows NetworkParser and its subclasses access to device | 709 // This allows NetworkParser and its subclasses access to device |
| 708 // privates so that they can be reconstituted during parsing. The | 710 // privates so that they can be reconstituted during parsing. The |
| 709 // parsers only access things through the private set_ functions so | 711 // parsers only access things through the private set_ functions so |
| 710 // that this class can evolve without having to change all the | 712 // that this class can evolve without having to change all the |
| 711 // parsers. | 713 // parsers. |
| 712 friend class NetworkParser; | 714 friend class NetworkParser; |
| 713 friend class NativeNetworkParser; | 715 friend class NativeNetworkParser; |
| 714 friend class NativeVirtualNetworkParser; | 716 friend class NativeVirtualNetworkParser; |
| (...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1743 const std::string& service_path) = 0; | 1745 const std::string& service_path) = 0; |
| 1744 | 1746 |
| 1745 // Factory function, creates a new instance and returns ownership. | 1747 // Factory function, creates a new instance and returns ownership. |
| 1746 // For normal usage, access the singleton via CrosLibrary::Get(). | 1748 // For normal usage, access the singleton via CrosLibrary::Get(). |
| 1747 static NetworkLibrary* GetImpl(bool stub); | 1749 static NetworkLibrary* GetImpl(bool stub); |
| 1748 }; | 1750 }; |
| 1749 | 1751 |
| 1750 } // namespace chromeos | 1752 } // namespace chromeos |
| 1751 | 1753 |
| 1752 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ | 1754 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_H_ |
| OLD | NEW |