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

Unified Diff: chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc

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: chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc
diff --git a/chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc b/chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc
index fef6e14c4d2bed903c4d19636e1cfa25844bb3d1..a0fb7dcaeb14d5420d1e1dbeec1680dde4e693f7 100644
--- a/chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc
+++ b/chrome/browser/ui/webui/settings/settings_cookies_view_handler.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/browsing_data/browsing_data_appcache_helper.h"
@@ -102,7 +103,7 @@ void CookiesViewHandler::TreeNodesAdded(ui::TreeModel* model,
base::DictionaryValue args;
if (parent == tree_model->GetRoot())
- args.Set(kId, base::Value::CreateNullValue());
+ args.Set(kId, base::MakeUnique<base::Value>());
else
args.SetString(kId, model_util_->GetTreeNodeId(parent_node));
args.SetInteger(kStart, start);
@@ -123,7 +124,7 @@ void CookiesViewHandler::TreeNodesRemoved(ui::TreeModel* model,
base::DictionaryValue args;
if (parent == tree_model->GetRoot())
- args.Set(kId, base::Value::CreateNullValue());
+ args.Set(kId, base::MakeUnique<base::Value>());
else
args.SetString(kId, model_util_->GetTreeNodeId(tree_model->AsNode(parent)));
args.SetInteger(kStart, start);
@@ -197,8 +198,7 @@ void CookiesViewHandler::HandleGetCookieDetails(const base::ListValue* args) {
cookies_tree_model_->GetRoot(), base::UTF8ToUTF16(site));
if (!node) {
- RejectJavascriptCallback(base::Value(callback_id_),
- *base::Value::CreateNullValue());
+ RejectJavascriptCallback(base::Value(callback_id_), base::Value());
callback_id_.clear();
return;
}
@@ -255,7 +255,7 @@ void CookiesViewHandler::SendChildren(const CookieTreeNode* parent) {
base::DictionaryValue args;
if (parent == cookies_tree_model_->GetRoot())
- args.Set(kId, base::Value::CreateNullValue());
+ args.Set(kId, base::MakeUnique<base::Value>());
else
args.SetString(kId, model_util_->GetTreeNodeId(parent));
args.Set(kChildren, std::move(children));
@@ -275,7 +275,7 @@ void CookiesViewHandler::SendCookieDetails(const CookieTreeNode* parent) {
base::DictionaryValue args;
if (parent == cookies_tree_model_->GetRoot())
- args.Set(kId, base::Value::CreateNullValue());
+ args.Set(kId, base::MakeUnique<base::Value>());
else
args.SetString(kId, model_util_->GetTreeNodeId(parent));
args.Set(kChildren, std::move(children));

Powered by Google App Engine
This is Rietveld 408576698