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

Unified Diff: chrome/browser/extensions/menu_manager.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/extensions/install_signer.cc ('k') | chrome/browser/extensions/policy_handlers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/menu_manager.cc
diff --git a/chrome/browser/extensions/menu_manager.cc b/chrome/browser/extensions/menu_manager.cc
index 7bfaf2d878036e95e6b304c81feb3af05259602f..dc1abda3af58c2b0a44833209da90d3ea32761af 100644
--- a/chrome/browser/extensions/menu_manager.cc
+++ b/chrome/browser/extensions/menu_manager.cc
@@ -625,6 +625,7 @@
if (item->type() == MenuItem::RADIO)
RadioItemSelected(item);
+ std::unique_ptr<base::ListValue> args(new base::ListValue());
std::unique_ptr<base::DictionaryValue> properties(
new base::DictionaryValue());
@@ -663,14 +664,8 @@
webview_guest->view_instance_id());
}
- auto args = base::MakeUnique<base::ListValue>();
- args->Reserve(2);
+ base::DictionaryValue* raw_properties = properties.get();
args->Append(std::move(properties));
- // |properties| is invalidated at this time, which is why |args| needs to be
- // queried for the pointer. The obtained pointer is guaranteed to stay valid
- // even after further Appends, because enough storage was reserved above.
- base::DictionaryValue* raw_properties = nullptr;
- args->GetDictionary(0, &raw_properties);
// Add the tab info to the argument list.
// No tab info in a platform app.
« no previous file with comments | « chrome/browser/extensions/install_signer.cc ('k') | chrome/browser/extensions/policy_handlers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698