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

Unified Diff: chrome/browser/custom_handlers/protocol_handler_registry.cc

Issue 2777063003: Stop passing raw pointers to base::Value API in c/b/chromeos and c/b/extensions (Closed)
Patch Set: Just rebased 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/custom_handlers/protocol_handler_registry.cc
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.cc b/chrome/browser/custom_handlers/protocol_handler_registry.cc
index 99f69bc9f0b41558c184ec224a039756bea3149e..139fed6e4116e9bdbf43f373d54ef67b66fa1370 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry.cc
@@ -13,6 +13,7 @@
#include "base/command_line.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "build/build_config.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile_io_data.h"
@@ -755,7 +756,7 @@ base::Value* ProtocolHandlerRegistry::EncodeRegisteredHandlers() {
j != i->second.end(); ++j) {
std::unique_ptr<base::DictionaryValue> encoded = j->Encode();
if (IsDefault(*j)) {
- encoded->Set("default", new base::Value(true));
+ encoded->Set("default", base::MakeUnique<base::Value>(true));
}
protocol_handlers->Append(std::move(encoded));
}

Powered by Google App Engine
This is Rietveld 408576698