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

Unified Diff: ios/chrome/browser/ui/webui/sync_internals/sync_internals_message_handler.cc

Issue 2817603003: Remove ListValue::Append(raw ptr) on Mac and iOS (Closed)
Patch Set: Fix even more Mac 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: ios/chrome/browser/ui/webui/sync_internals/sync_internals_message_handler.cc
diff --git a/ios/chrome/browser/ui/webui/sync_internals/sync_internals_message_handler.cc b/ios/chrome/browser/ui/webui/sync_internals/sync_internals_message_handler.cc
index 4a136416c31d2eb21477d4f99ac8c7da66751e4a..942459bc8a7ee839cc6ea952f652e29fdd4c153f 100644
--- a/ios/chrome/browser/ui/webui/sync_internals/sync_internals_message_handler.cc
+++ b/ios/chrome/browser/ui/webui/sync_internals/sync_internals_message_handler.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/values.h"
#include "components/browser_sync/profile_sync_service.h"
#include "components/signin/core/browser/signin_manager.h"
@@ -125,7 +126,8 @@ void SyncInternalsMessageHandler::HandleRequestListOfTypes(
ModelTypeSet protocol_types = syncer::ProtocolTypes();
for (ModelTypeSet::Iterator it = protocol_types.First(); it.Good();
it.Inc()) {
- type_list->Append(new base::Value(ModelTypeToString(it.Get())));
+ type_list->Append(
+ base::MakeUnique<base::Value>(ModelTypeToString(it.Get())));
jdoerrie 2017/04/12 12:37:46 Consider using AppendString and removing the added
vabr (Chromium) 2017/04/12 12:55:04 Done.
}
event_details.Set(syncer::sync_ui_util::kTypes, type_list.release());
web_ui()->CallJavascriptFunction(

Powered by Google App Engine
This is Rietveld 408576698