New issue
Advanced search Search tips

Issue 675860 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 654988



Sign in to add a comment

Support sending any base::Value types over mojo

Project Member Reported by sa...@chromium.org, Dec 20 2016

Issue description

Mojo structs typemapped to base::DictionaryValue and base::ListValue already exist, but to send an arbitrary base::Value requires wrapping it in a ListValue. Additionally, since they map directly to the Value types, they can't be used in sync responses (sync responses require a move assignment operator).

std::unique_ptr<base::Value>, std::unique_ptr<base::DictionaryValue> and std::unique_ptr<base::ListValue> should be supported instead.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7

commit 9bd0ed45ad35ed78c4ccd55321f884cacd0778d7
Author: sammc <sammc@chromium.org>
Date: Wed Dec 21 08:55:41 2016

Add struct traits for base::Value.

BUG= 675860 

Review-Url: https://codereview.chromium.org/2577563002
Cr-Commit-Position: refs/heads/master@{#440057}

[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/base/json/json_parser.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/base/values.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/base/values.h
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/chrome/browser/importer/external_process_importer_client.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/chrome/utility/profile_import_handler.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/chrome/utility/profile_import_handler.h
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/components/arc/common/bluetooth.mojom
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/components/safe_json/public/interfaces/BUILD.gn
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/components/safe_json/public/interfaces/safe_json.mojom
[delete] https://crrev.com/44dabf826136f0ddfab6f908036b68c7dce9a616/components/safe_json/public/interfaces/safe_json.typemap
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/components/safe_json/safe_json_parser_impl.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/components/safe_json/safe_json_parser_impl.h
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/components/safe_json/utility/safe_json_parser_mojo_impl.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/components/typemaps.gni
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/content/browser/renderer_host/media/video_capture_controller.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/content/browser/renderer_host/media/video_capture_host.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/content/renderer/media/video_capture_impl.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/content/renderer/media/video_capture_impl_unittest.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/media/base/video_frame_metadata.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/media/base/video_frame_metadata.h
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/mojo/common/common_custom_types_unittest.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/mojo/common/test_common_custom_types.mojom
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/mojo/common/values.mojom
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/mojo/common/values.typemap
[add] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/mojo/common/values_struct_traits.cc
[add] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/mojo/common/values_struct_traits.h
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/services/preferences/public/cpp/pref_observer_store.cc
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/services/preferences/public/cpp/pref_observer_store.h
[modify] https://crrev.com/9bd0ed45ad35ed78c4ccd55321f884cacd0778d7/services/preferences/public/cpp/tests/pref_observer_store_unittest.cc

Comment 2 by sa...@chromium.org, Dec 28 2016

Status: Fixed (was: Started)
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e1b6d38fd369d03ac2f13349a9d329ff0a8943d9

commit e1b6d38fd369d03ac2f13349a9d329ff0a8943d9
Author: sammc <sammc@chromium.org>
Date: Tue Jan 17 22:40:01 2017

Change base::DictionaryValue mojo deserialization to not expand paths.

Currently, when deserializing a base::DictionaryValue from mojo, the
values in the dictionary are set with Set(), which expands paths. This
causes data to be mutated when round-tripping through mojo. This CL
changes it to use SetWithoutPathExpansion() to avoid this mutation.

BUG= 675860 

Review-Url: https://codereview.chromium.org/2636113002
Cr-Commit-Position: refs/heads/master@{#444169}

[modify] https://crrev.com/e1b6d38fd369d03ac2f13349a9d329ff0a8943d9/mojo/common/common_custom_types_unittest.cc
[modify] https://crrev.com/e1b6d38fd369d03ac2f13349a9d329ff0a8943d9/mojo/common/values_struct_traits.cc

Sign in to add a comment