Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chromeos / network / managed_state.h
index 2cab509..d33aa8b 100644 (file)
@@ -19,7 +19,6 @@ class DictionaryValue;
 namespace chromeos {
 
 class DeviceState;
-class FavoriteState;
 class NetworkState;
 class NetworkTypePattern;
 
@@ -29,7 +28,6 @@ class CHROMEOS_EXPORT ManagedState {
  public:
   enum ManagedType {
     MANAGED_TYPE_NETWORK,
-    MANAGED_TYPE_FAVORITE,
     MANAGED_TYPE_DEVICE
   };
 
@@ -43,7 +41,6 @@ class CHROMEOS_EXPORT ManagedState {
   // NULL if it is not.
   NetworkState* AsNetworkState();
   DeviceState* AsDeviceState();
-  FavoriteState* AsFavoriteState();
 
   // Called by NetworkStateHandler when a property was received. The return
   // value indicates if the state changed and is used to reduce the number of
@@ -64,7 +61,11 @@ class CHROMEOS_EXPORT ManagedState {
   virtual bool InitialPropertiesReceived(
       const base::DictionaryValue& properties);
 
-  const ManagedType managed_type() const { return managed_type_; }
+  // Fills |dictionary| with a minimal set of state properties for the network
+  // type. See implementations for which properties are included.
+  virtual void GetStateProperties(base::DictionaryValue* dictionary) const;
+
+  ManagedType managed_type() const { return managed_type_; }
   const std::string& path() const { return path_; }
   const std::string& name() const { return name_; }
   const std::string& type() const { return type_; }
@@ -75,8 +76,11 @@ class CHROMEOS_EXPORT ManagedState {
     update_requested_ = update_requested;
   }
 
+  // Returns true if |type_| matches |pattern|.
   bool Matches(const NetworkTypePattern& pattern) const;
 
+  static std::string TypeToString(ManagedType type);
+
  protected:
   ManagedState(ManagedType type, const std::string& path);