Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: components/login/screens/screen_context.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 14 matching lines...) Expand all
25 25
26 } // namespace 26 } // namespace
27 27
28 ScreenContext::ScreenContext() { 28 ScreenContext::ScreenContext() {
29 } 29 }
30 30
31 ScreenContext::~ScreenContext() { 31 ScreenContext::~ScreenContext() {
32 } 32 }
33 33
34 bool ScreenContext::SetBoolean(const KeyType& key, bool value) { 34 bool ScreenContext::SetBoolean(const KeyType& key, bool value) {
35 return Set(key, new base::FundamentalValue(value)); 35 return Set(key, new base::Value(value));
36 } 36 }
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::FundamentalValue(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::FundamentalValue(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::StringValue(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::StringValue(value));
52 } 52 }
53 53
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « components/login/base_screen_handler_utils.cc ('k') | components/ownership/owner_settings_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698