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

Unified Diff: components/dom_distiller/ios/distiller_page_ios.mm

Issue 2792573002: Remove base::Value::CreateNullValue (Closed)
Patch Set: Rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: components/dom_distiller/ios/distiller_page_ios.mm
diff --git a/components/dom_distiller/ios/distiller_page_ios.mm b/components/dom_distiller/ios/distiller_page_ios.mm
index 04bfd9008bd156e9a5da91b44d6b29d20567d9a3..1b19a6fde56ef03b386c00a630ba826fabe2e687 100644
--- a/components/dom_distiller/ios/distiller_page_ios.mm
+++ b/components/dom_distiller/ios/distiller_page_ios.mm
@@ -66,7 +66,7 @@ std::unique_ptr<base::Value> ValueResultFromScriptResult(id wk_result,
result.reset(new base::Value(static_cast<bool>([wk_result boolValue])));
DCHECK(result->IsType(base::Value::Type::BOOLEAN));
} else if (result_type == CFNullGetTypeID()) {
- result = base::Value::CreateNullValue();
+ result = base::MakeUnique<base::Value>();
DCHECK(result->IsType(base::Value::Type::NONE));
} else if (result_type == CFDictionaryGetTypeID()) {
std::unique_ptr<base::DictionaryValue> dictionary =
@@ -232,7 +232,7 @@ void DistillerPageIOS::OnLoadURLDone(
}
void DistillerPageIOS::HandleJavaScriptResult(id result) {
- std::unique_ptr<base::Value> resultValue = base::Value::CreateNullValue();
+ auto resultValue = base::MakeUnique<base::Value>();
if (result) {
resultValue = ValueResultFromScriptResult(result);
}
« no previous file with comments | « components/dom_distiller/core/distiller_unittest.cc ('k') | components/history/core/browser/top_sites_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698