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 #ifndef COMPONENTS_LOGIN_BASE_SCREEN_HANDLER_UTILS_H_ | 5 #ifndef COMPONENTS_LOGIN_BASE_SCREEN_HANDLER_UTILS_H_ |
6 #define COMPONENTS_LOGIN_BASE_SCREEN_HANDLER_UTILS_H_ | 6 #define COMPONENTS_LOGIN_BASE_SCREEN_HANDLER_UTILS_H_ |
7 | 7 |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "base/tuple.h" | 14 #include "base/tuple.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "components/login/login_export.h" | 16 #include "components/login/login_export.h" |
17 | 17 |
18 namespace login { | 18 namespace login { |
19 | 19 |
20 typedef std::vector<std::string> StringList; | 20 typedef std::vector<std::string> StringList; |
21 typedef std::vector<base::string16> String16List; | 21 typedef std::vector<base::string16> String16List; |
22 | 22 |
23 template <typename T> | 23 template <typename T> |
24 struct LOGIN_EXPORT UnwrapConstRef { | 24 struct LOGIN_EXPORT UnwrapConstRef { |
25 typedef T Type; | 25 typedef T Type; |
26 }; | 26 }; |
27 | 27 |
28 template <typename T> | 28 template <typename T> |
29 struct LOGIN_EXPORT UnwrapConstRef<const T&> { | 29 struct UnwrapConstRef<const T&> { |
30 typedef T Type; | 30 typedef T Type; |
31 }; | 31 }; |
32 | 32 |
33 bool LOGIN_EXPORT ParseValue(const base::Value* value, bool* out_value); | 33 bool LOGIN_EXPORT ParseValue(const base::Value* value, bool* out_value); |
34 bool LOGIN_EXPORT ParseValue(const base::Value* value, int* out_value); | 34 bool LOGIN_EXPORT ParseValue(const base::Value* value, int* out_value); |
35 bool LOGIN_EXPORT ParseValue(const base::Value* value, double* out_value); | 35 bool LOGIN_EXPORT ParseValue(const base::Value* value, double* out_value); |
36 bool LOGIN_EXPORT ParseValue(const base::Value* value, std::string* out_value); | 36 bool LOGIN_EXPORT ParseValue(const base::Value* value, std::string* out_value); |
37 bool LOGIN_EXPORT | 37 bool LOGIN_EXPORT |
38 ParseValue(const base::Value* value, base::string16* out_value); | 38 ParseValue(const base::Value* value, base::string16* out_value); |
39 bool LOGIN_EXPORT ParseValue(const base::Value* value, | 39 bool LOGIN_EXPORT ParseValue(const base::Value* value, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 void CallbackWrapper(const base::Callback<void(Args...)>& callback, | 81 void CallbackWrapper(const base::Callback<void(Args...)>& callback, |
82 const base::ListValue* args) { | 82 const base::ListValue* args) { |
83 DispatchToCallback(callback, args, | 83 DispatchToCallback(callback, args, |
84 base::MakeIndexSequence<sizeof...(Args)>()); | 84 base::MakeIndexSequence<sizeof...(Args)>()); |
85 } | 85 } |
86 | 86 |
87 | 87 |
88 } // namespace login | 88 } // namespace login |
89 | 89 |
90 #endif // COMPONENTS_LOGIN_BASE_SCREEN_HANDLER_UTILS_H_ | 90 #endif // COMPONENTS_LOGIN_BASE_SCREEN_HANDLER_UTILS_H_ |
OLD | NEW |