| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "components/login/screens/screen_context.h" | 5 #include "components/login/screens/screen_context.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 bool ScreenContext::SetInteger(const KeyType& key, int value) { | 38 bool ScreenContext::SetInteger(const KeyType& key, int value) { |
| 39 return Set(key, new base::Value(value)); | 39 return Set(key, new base::Value(value)); |
| 40 } | 40 } |
| 41 | 41 |
| 42 bool ScreenContext::SetDouble(const KeyType& key, double value) { | 42 bool ScreenContext::SetDouble(const KeyType& key, double value) { |
| 43 return Set(key, new base::Value(value)); | 43 return Set(key, new base::Value(value)); |
| 44 } | 44 } |
| 45 | 45 |
| 46 bool ScreenContext::SetString(const KeyType& key, const std::string& value) { | 46 bool ScreenContext::SetString(const KeyType& key, const std::string& value) { |
| 47 return Set(key, new base::StringValue(value)); | 47 return Set(key, new base::Value(value)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 bool ScreenContext::SetString(const KeyType& key, const base::string16& value) { | 50 bool ScreenContext::SetString(const KeyType& key, const base::string16& value) { |
| 51 return Set(key, new base::StringValue(value)); | 51 return Set(key, new base::Value(value)); |
| 52 } | 52 } |
| 53 | 53 |
| 54 bool ScreenContext::SetStringList(const KeyType& key, const StringList& value) { | 54 bool ScreenContext::SetStringList(const KeyType& key, const StringList& value) { |
| 55 return Set(key, StringListToListValue(value)); | 55 return Set(key, StringListToListValue(value)); |
| 56 } | 56 } |
| 57 | 57 |
| 58 bool ScreenContext::SetString16List(const KeyType& key, | 58 bool ScreenContext::SetString16List(const KeyType& key, |
| 59 const String16List& value) { | 59 const String16List& value) { |
| 60 return Set(key, StringListToListValue(value)); | 60 return Set(key, StringListToListValue(value)); |
| 61 } | 61 } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 // Don't do anything if |storage_| already contains <|key|, |new_value|> pair. | 175 // Don't do anything if |storage_| already contains <|key|, |new_value|> pair. |
| 176 if (in_storage && new_value->Equals(current_value)) | 176 if (in_storage && new_value->Equals(current_value)) |
| 177 return false; | 177 return false; |
| 178 | 178 |
| 179 changes_.Set(key, new_value->DeepCopy()); | 179 changes_.Set(key, new_value->DeepCopy()); |
| 180 storage_.Set(key, new_value.release()); | 180 storage_.Set(key, new_value.release()); |
| 181 return true; | 181 return true; |
| 182 } | 182 } |
| 183 | 183 |
| 184 } // namespace login | 184 } // namespace login |
| OLD | NEW |