| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chromeos/network/managed_state.h" | 5 #include "chromeos/network/managed_state.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chromeos/network/device_state.h" | 9 #include "chromeos/network/device_state.h" |
| 10 #include "chromeos/network/favorite_state.h" | 10 #include "chromeos/network/favorite_state.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 return static_cast<DeviceState*>(this); | 46 return static_cast<DeviceState*>(this); |
| 47 return NULL; | 47 return NULL; |
| 48 } | 48 } |
| 49 | 49 |
| 50 FavoriteState* ManagedState::AsFavoriteState() { | 50 FavoriteState* ManagedState::AsFavoriteState() { |
| 51 if (managed_type() == MANAGED_TYPE_FAVORITE) | 51 if (managed_type() == MANAGED_TYPE_FAVORITE) |
| 52 return static_cast<FavoriteState*>(this); | 52 return static_cast<FavoriteState*>(this); |
| 53 return NULL; | 53 return NULL; |
| 54 } | 54 } |
| 55 | 55 |
| 56 void ManagedState::InitialPropertiesReceived() { | 56 bool ManagedState::InitialPropertiesReceived( |
| 57 const base::DictionaryValue& properties) { |
| 58 return false; |
| 57 } | 59 } |
| 58 | 60 |
| 59 bool ManagedState::ManagedStatePropertyChanged(const std::string& key, | 61 bool ManagedState::ManagedStatePropertyChanged(const std::string& key, |
| 60 const base::Value& value) { | 62 const base::Value& value) { |
| 61 if (key == flimflam::kNameProperty) { | 63 if (key == flimflam::kNameProperty) { |
| 62 return GetStringValue(key, value, &name_); | 64 return GetStringValue(key, value, &name_); |
| 63 } else if (key == flimflam::kTypeProperty) { | 65 } else if (key == flimflam::kTypeProperty) { |
| 64 return GetStringValue(key, value, &type_); | 66 return GetStringValue(key, value, &type_); |
| 65 } | 67 } |
| 66 return false; | 68 return false; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 return false; | 123 return false; |
| 122 } | 124 } |
| 123 new_value = static_cast<uint32>(double_value); | 125 new_value = static_cast<uint32>(double_value); |
| 124 if (*out_value == new_value) | 126 if (*out_value == new_value) |
| 125 return false; | 127 return false; |
| 126 *out_value = new_value; | 128 *out_value = new_value; |
| 127 return true; | 129 return true; |
| 128 } | 130 } |
| 129 | 131 |
| 130 } // namespace chromeos | 132 } // namespace chromeos |
| OLD | NEW |