Chromium Code Reviews| 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/onc/onc_constants.h" | 9 #include "chromeos/network/onc/onc_constants.h" |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 | 25 |
| 26 // ManagedState overrides | 26 // ManagedState overrides |
| 27 virtual bool PropertyChanged(const std::string& key, | 27 virtual bool PropertyChanged(const std::string& key, |
| 28 const base::Value& value) OVERRIDE; | 28 const base::Value& value) OVERRIDE; |
| 29 | 29 |
| 30 // Accessors | 30 // Accessors |
| 31 const std::string& profile_path() const { return profile_path_; } | 31 const std::string& profile_path() const { return profile_path_; } |
| 32 bool is_favorite() const { return !profile_path_.empty(); } | 32 bool is_favorite() const { return !profile_path_.empty(); } |
| 33 onc::ONCSource onc_source() const { return onc_source_; } | 33 onc::ONCSource onc_source() const { return onc_source_; } |
| 34 | 34 |
| 35 // Returns true if the ONC source is a device or user policy. | |
| 35 bool IsManaged() const; | 36 bool IsManaged() const; |
| 36 bool IsShared() const; | 37 |
| 38 // Returns true if the network properties are stored in the user profile. | |
|
pneubeck (no reviews)
2013/07/29 19:13:25
nit: the user profile -> a user profile
stevenjb
2013/07/29 20:25:47
Done.
| |
| 39 bool IsPrivate() const; | |
| 37 | 40 |
| 38 private: | 41 private: |
| 39 std::string profile_path_; | 42 std::string profile_path_; |
| 40 onc::ONCSource onc_source_; | 43 onc::ONCSource onc_source_; |
| 41 | 44 |
| 42 DISALLOW_COPY_AND_ASSIGN(FavoriteState); | 45 DISALLOW_COPY_AND_ASSIGN(FavoriteState); |
| 43 }; | 46 }; |
| 44 | 47 |
| 45 } // namespace chromeos | 48 } // namespace chromeos |
| 46 | 49 |
| 47 #endif // CHROMEOS_NETWORK_FAVORITE_STATE_H_ | 50 #endif // CHROMEOS_NETWORK_FAVORITE_STATE_H_ |
| OLD | NEW |