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

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

Issue 672203003: ScreenContext is moved to components/login. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 1 month 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 "chrome/browser/chromeos/login/screens/screen_context.h" 5 #include "components/login/screens/screen_context.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 9
10 namespace chromeos { 10 namespace login {
11 11
12 namespace { 12 namespace {
13 13
14 template <typename StringListType> 14 template <typename StringListType>
15 base::ListValue* StringListToListValue(const StringListType& list) { 15 base::ListValue* StringListToListValue(const StringListType& list) {
16 base::ListValue* result = new base::ListValue(); 16 base::ListValue* result = new base::ListValue();
17 for (typename StringListType::const_iterator it = list.begin(); 17 for (typename StringListType::const_iterator it = list.begin();
18 it != list.end(); 18 it != list.end();
19 ++it) { 19 ++it) {
20 result->AppendString(*it); 20 result->AppendString(*it);
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 // Don't do anything if |storage_| already contains <|key|, |new_value|> pair. 168 // Don't do anything if |storage_| already contains <|key|, |new_value|> pair.
169 if (in_storage && new_value->Equals(current_value)) 169 if (in_storage && new_value->Equals(current_value))
170 return false; 170 return false;
171 171
172 changes_.Set(key, new_value->DeepCopy()); 172 changes_.Set(key, new_value->DeepCopy());
173 storage_.Set(key, new_value.release()); 173 storage_.Set(key, new_value.release());
174 return true; 174 return true;
175 } 175 }
176 176
177 } // namespace chromeos 177 } // namespace login
OLDNEW
« no previous file with comments | « components/login/screens/screen_context.h ('k') | components/login/screens/screen_context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698