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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/base_screen_handler_utils.h

Issue 328763003: Added usefull utility methods to Screen and ScreenContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_UTILS_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_UTILS_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_UTILS_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_UTILS_H_
7 7
8 #include <cstddef> 8 #include <cstddef>
9 #include <string> 9 #include <string>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 template<> 58 template<>
59 inline bool ParseValue<const base::DictionaryValue*>( 59 inline bool ParseValue<const base::DictionaryValue*>(
60 const base::Value* value, 60 const base::Value* value,
61 const base::DictionaryValue** out_value) { 61 const base::DictionaryValue** out_value) {
62 return value->GetAsDictionary(out_value); 62 return value->GetAsDictionary(out_value);
63 } 63 }
64 64
65 template<typename T> 65 template<typename T>
66 inline bool GetArg(const base::ListValue* args, size_t index, T* out_value) { 66 inline bool GetArg(const base::ListValue* args, size_t index, T* out_value) {
67 const base::Value* value; 67 const base::Value* value;
68 if (!args->Get(index, &value)) 68 if (!args->Get(index, &value)) {
69 LOG(ERROR) << "Returning false";
ygorshenin1 2014/06/11 10:44:00 nit: debug code?
dzhioev (left Google) 2014/06/18 14:43:39 Yes. Removed.
69 return false; 70 return false;
71 }
70 return ParseValue(value, out_value); 72 return ParseValue(value, out_value);
71 } 73 }
72 74
73 inline base::FundamentalValue MakeValue(bool v) { 75 inline base::FundamentalValue MakeValue(bool v) {
74 return base::FundamentalValue(v); 76 return base::FundamentalValue(v);
75 } 77 }
76 78
77 inline base::FundamentalValue MakeValue(int v) { 79 inline base::FundamentalValue MakeValue(int v) {
78 return base::FundamentalValue(v); 80 return base::FundamentalValue(v);
79 } 81 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 !GetArg(args, 3, &arg4)) { 163 !GetArg(args, 3, &arg4)) {
162 NOTREACHED(); 164 NOTREACHED();
163 return; 165 return;
164 } 166 }
165 callback.Run(arg1, arg2, arg3, arg4); 167 callback.Run(arg1, arg2, arg3, arg4);
166 } 168 }
167 169
168 } // namespace chromeos 170 } // namespace chromeos
169 171
170 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_UTILS_H_ 172 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_BASE_SCREEN_HANDLER_UTILS_H_
OLDNEW
« chrome/browser/resources/login/screen.js ('K') | « chrome/browser/resources/login/screen.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698