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

Unified Diff: ipc/ipc_message_utils.cc

Issue 2000803003: Use std::unique_ptr for base::DictionaryValue and base::ListValue's internal store. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 4 years, 7 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
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.mm ('k') | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils.cc
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index f31add1da14805c95f4ece9a445da88304fbab1f..3bdf20733c7e5d23c3f468912906eb2943306b75 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -126,9 +126,8 @@ void GetValueSize(base::PickleSizer* sizer,
case base::Value::TYPE_LIST: {
sizer->AddInt();
const base::ListValue* list = static_cast<const base::ListValue*>(value);
- for (base::ListValue::const_iterator it = list->begin();
- it != list->end(); ++it) {
- GetValueSize(sizer, *it, recursion + 1);
+ for (const auto& entry : *list) {
+ GetValueSize(sizer, entry.get(), recursion + 1);
}
break;
}
@@ -199,9 +198,8 @@ void WriteValue(base::Pickle* m, const base::Value* value, int recursion) {
case base::Value::TYPE_LIST: {
const base::ListValue* list = static_cast<const base::ListValue*>(value);
WriteParam(m, static_cast<int>(list->GetSize()));
- for (base::ListValue::const_iterator it = list->begin();
- it != list->end(); ++it) {
- WriteValue(m, *it, recursion + 1);
+ for (const auto& entry : *list) {
+ WriteValue(m, entry.get(), recursion + 1);
}
break;
}
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.mm ('k') | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698