OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROMEOS_NETWORK_FAVORITE_STATE_H_ | 5 #ifndef CHROMEOS_NETWORK_FAVORITE_STATE_H_ |
6 #define CHROMEOS_NETWORK_FAVORITE_STATE_H_ | 6 #define CHROMEOS_NETWORK_FAVORITE_STATE_H_ |
7 | 7 |
8 #include "chromeos/network/managed_state.h" | 8 #include "chromeos/network/managed_state.h" |
9 #include "chromeos/network/network_ui_data.h" | 9 #include "chromeos/network/network_ui_data.h" |
10 #include "chromeos/network/onc/onc_constants.h" | 10 #include "chromeos/network/onc/onc_constants.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 virtual ~FavoriteState(); | 25 virtual ~FavoriteState(); |
26 | 26 |
27 // ManagedState overrides | 27 // ManagedState overrides |
28 virtual bool PropertyChanged(const std::string& key, | 28 virtual bool PropertyChanged(const std::string& key, |
29 const base::Value& value) OVERRIDE; | 29 const base::Value& value) OVERRIDE; |
30 | 30 |
31 // Accessors | 31 // Accessors |
32 const std::string& profile_path() const { return profile_path_; } | 32 const std::string& profile_path() const { return profile_path_; } |
33 bool is_favorite() const { return !profile_path_.empty(); } | 33 bool is_favorite() const { return !profile_path_.empty(); } |
34 const NetworkUIData& ui_data() const { return ui_data_; } | 34 const NetworkUIData& ui_data() const { return ui_data_; } |
| 35 const std::string& guid() const { return guid_; } |
35 | 36 |
36 // Returns true if the ONC source is a device or user policy. | 37 // Returns true if the ONC source is a device or user policy. |
37 bool IsManaged() const; | 38 bool IsManaged() const; |
38 | 39 |
39 // Returns true if the network properties are stored in a user profile. | 40 // Returns true if the network properties are stored in a user profile. |
40 bool IsPrivate() const; | 41 bool IsPrivate() const; |
41 | 42 |
42 private: | 43 private: |
43 std::string profile_path_; | 44 std::string profile_path_; |
44 NetworkUIData ui_data_; | 45 NetworkUIData ui_data_; |
| 46 std::string guid_; |
45 | 47 |
46 DISALLOW_COPY_AND_ASSIGN(FavoriteState); | 48 DISALLOW_COPY_AND_ASSIGN(FavoriteState); |
47 }; | 49 }; |
48 | 50 |
49 } // namespace chromeos | 51 } // namespace chromeos |
50 | 52 |
51 #endif // CHROMEOS_NETWORK_FAVORITE_STATE_H_ | 53 #endif // CHROMEOS_NETWORK_FAVORITE_STATE_H_ |
OLD | NEW |