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

Unified Diff: ios/web/web_state/ui/web_view_js_utils.mm

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/public/web_state/web_state.h ('k') | ios/web/web_state/ui/web_view_js_utils_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/web_view_js_utils.mm
diff --git a/ios/web/web_state/ui/web_view_js_utils.mm b/ios/web/web_state/ui/web_view_js_utils.mm
index 5036d489eb371de273863e7c89db989c77bab6ca..fb402fdd812e5c55e1e769d994c31b57722a604a 100644
--- a/ios/web/web_state/ui/web_view_js_utils.mm
+++ b/ios/web/web_state/ui/web_view_js_utils.mm
@@ -33,17 +33,17 @@ std::unique_ptr<base::Value> ValueResultFromWKResult(id wk_result,
CFTypeID result_type = CFGetTypeID(wk_result);
if (result_type == CFStringGetTypeID()) {
result.reset(new base::StringValue(base::SysNSStringToUTF16(wk_result)));
- DCHECK(result->IsType(base::Value::TYPE_STRING));
+ DCHECK(result->IsType(base::Value::Type::STRING));
} else if (result_type == CFNumberGetTypeID()) {
result.reset(new base::FundamentalValue([wk_result doubleValue]));
- DCHECK(result->IsType(base::Value::TYPE_DOUBLE));
+ DCHECK(result->IsType(base::Value::Type::DOUBLE));
} else if (result_type == CFBooleanGetTypeID()) {
result.reset(
new base::FundamentalValue(static_cast<bool>([wk_result boolValue])));
- DCHECK(result->IsType(base::Value::TYPE_BOOLEAN));
+ DCHECK(result->IsType(base::Value::Type::BOOLEAN));
} else if (result_type == CFNullGetTypeID()) {
result = base::Value::CreateNullValue();
- DCHECK(result->IsType(base::Value::TYPE_NULL));
+ DCHECK(result->IsType(base::Value::Type::NONE));
} else if (result_type == CFDictionaryGetTypeID()) {
std::unique_ptr<base::DictionaryValue> dictionary =
base::MakeUnique<base::DictionaryValue>();
« no previous file with comments | « ios/web/public/web_state/web_state.h ('k') | ios/web/web_state/ui/web_view_js_utils_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698