SandboxedUnpacker::OnUnpackSuccess could return a std::unique_ptr to the manifest dict |
||
Issue descriptionWhen converting the utility process extension Unpacker IPC to mojo (see https://codereview.chromium.org/2697463002 [1]), it was noted that the browser-side clients receive the unpacked manifest result from the SandboxedUnpacker as a bare pointer in the OnUnpackSuccess() callback ... const base::DictionaryValue* original_manifest Some clients make a base::DictionaryValue->DeepCopy() of original_manifest if they need to retain its content. The SandboxedUnpacker, after [1], has the original_manifest available in a std::unique_ptr<base::DictionaryValue>, and it could pass that to all clients instead. Clients would then not need to do a DeepCopy().
,
Mar 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6cff6b18a5bc0741499ac4b1ba45ffe9c4ddccdd commit 6cff6b18a5bc0741499ac4b1ba45ffe9c4ddccdd Author: lazyboy <lazyboy@chromium.org> Date: Thu Mar 30 18:43:49 2017 Transfer DictionaryValue ownership in SandboxedUnpacker::OnUnpackSuccess() This would avoid DeepCopy() in clients that care about retaining the DictionaryValue's ownership. BUG= 699528 Test=None Review-Url: https://codereview.chromium.org/2788563002 Cr-Commit-Position: refs/heads/master@{#460835} [modify] https://crrev.com/6cff6b18a5bc0741499ac4b1ba45ffe9c4ddccdd/chrome/browser/chromeos/app_mode/kiosk_app_data.cc [modify] https://crrev.com/6cff6b18a5bc0741499ac4b1ba45ffe9c4ddccdd/chrome/browser/chromeos/app_mode/kiosk_external_update_validator.cc [modify] https://crrev.com/6cff6b18a5bc0741499ac4b1ba45ffe9c4ddccdd/chrome/browser/chromeos/app_mode/kiosk_external_update_validator.h [modify] https://crrev.com/6cff6b18a5bc0741499ac4b1ba45ffe9c4ddccdd/chrome/browser/extensions/crx_installer.cc [modify] https://crrev.com/6cff6b18a5bc0741499ac4b1ba45ffe9c4ddccdd/chrome/browser/extensions/crx_installer.h [modify] https://crrev.com/6cff6b18a5bc0741499ac4b1ba45ffe9c4ddccdd/chrome/browser/extensions/startup_helper.cc [modify] https://crrev.com/6cff6b18a5bc0741499ac4b1ba45ffe9c4ddccdd/extensions/browser/sandboxed_unpacker.cc [modify] https://crrev.com/6cff6b18a5bc0741499ac4b1ba45ffe9c4ddccdd/extensions/browser/sandboxed_unpacker.h [modify] https://crrev.com/6cff6b18a5bc0741499ac4b1ba45ffe9c4ddccdd/extensions/browser/sandboxed_unpacker_unittest.cc
,
Mar 30 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by rdevlin....@chromium.org
, Mar 24 2017