New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 784667 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

The data_decode service should have XML parsing capabilities

Project Member Reported by jcivelli@chromium.org, Nov 14 2017

Issue description

We should add some simple XML parsing capabilities to the data-decoder services so that no new service needs to be created for parsing XML safely.
It would transform XML into a base:Value.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 28 2017

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

commit 90a4cb1cd1afc7601d2b1a577d8e05523cc08a96
Author: Jay Civelli <jcivelli@google.com>
Date: Tue Nov 28 21:04:52 2017

Adding a SafeXMLParser to the data-decoder service.

Introducing a new XML parser service that parses XML into a
base::DictionaryValue. It does so by JSONifying the XML content.

Also factoring out TestServiceManagerListener to its own file, now that
it is used in 2 places (safe_json_parser_browsertest.cc and
safe_xml_parser_browsertest.cc).

Bug:  784667 
Change-Id: I1f41f44d49910da43837aac8bca52e24533460ef
Reviewed-on: https://chromium-review.googlesource.com/767890
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519832}
[modify] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/chrome/browser/safe_json_parser_browsertest.cc
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/chrome/browser/safe_xml_parser_browsertest.cc
[modify] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/chrome/test/BUILD.gn
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/chrome/test/base/test_service_manager_listener.cc
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/chrome/test/base/test_service_manager_listener.h
[modify] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/content/public/app/mojo/content_browser_manifest.json
[modify] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/BUILD.gn
[modify] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/DEPS
[modify] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/data_decoder_service.cc
[modify] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/manifest.json
[modify] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/public/cpp/BUILD.gn
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/public/cpp/safe_xml_parser.cc
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/public/cpp/safe_xml_parser.h
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/public/cpp/safe_xml_parser_unittest.cc
[modify] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/public/interfaces/BUILD.gn
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/public/interfaces/xml_parser.mojom
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/xml_parser.cc
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/xml_parser.h
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/xml_parser_fuzzer.cc
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/xml_parser_fuzzer_corpus/input0
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/xml_parser_fuzzer_corpus/input1
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/xml_parser_fuzzer_corpus/input2
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/xml_parser_fuzzer_corpus/input3
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/xml_parser_fuzzer_corpus/input4
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/xml_parser_fuzzer_corpus/input5
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/xml_parser_fuzzer_corpus/input6
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/xml_parser_fuzzer_corpus/input7
[add] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/services/data_decoder/xml_parser_unittest.cc
[modify] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/third_party/libxml/chromium/libxml_utils.cc
[modify] https://crrev.com/90a4cb1cd1afc7601d2b1a577d8e05523cc08a96/third_party/libxml/chromium/libxml_utils.h

Status: Fixed (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 29 2017

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

commit ed29765cac0c726deb98563941d915616b4c3d0b
Author: Jay Civelli <jcivelli@google.com>
Date: Wed Nov 29 04:17:46 2017

Adding a mode to SafeXmlParser for process sharing.

Adding an optional |batch_id| parameter to SamleXmlParser::ParseXml()
that so that parsings can end up sharing processes.
This is useful for clients that parse XML files in batches and want to
limit process churn.

Bug:  784667 
Change-Id: Iedafd927b4c3e06e10e6bb04f2232a732423b125
Reviewed-on: https://chromium-review.googlesource.com/777889
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519997}
[modify] https://crrev.com/ed29765cac0c726deb98563941d915616b4c3d0b/chrome/browser/safe_xml_parser_browsertest.cc
[modify] https://crrev.com/ed29765cac0c726deb98563941d915616b4c3d0b/services/data_decoder/public/cpp/safe_xml_parser.cc
[modify] https://crrev.com/ed29765cac0c726deb98563941d915616b4c3d0b/services/data_decoder/public/cpp/safe_xml_parser.h

Project Member

Comment 4 by bugdroid1@chromium.org, Nov 30 2017

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

commit c0e3a8e5486d92bab1dbe36563eea6515ffe9d61
Author: Jay Civelli <jcivelli@google.com>
Date: Thu Nov 30 00:08:20 2017

Adding attribute and namespace support to the XML parser.

Several improvements to the safe XML parser:
- adding attribute support.
- adding namespace support. A new namespace section exposing the
  namespace declared in a node is generated in the parsed Value.
  Also elements and attributes now use the fully qualified names
  (including namespace).
- several methods added to the client library, for attribute and
  namespace access and for the needs of upcoming clients.
- created a TestDataDecoderService class that can be used in tests
  to access a service_manager::Connector that can bind the
  data_decoder's interfaces. This has the advantage of not requiring
  a dependency to the private implementation of data_decoder that is
  required when using TestConnectorFactory directly.

Bug:  784667 
Change-Id: I9b87341eca5eed4a72f4d55cc29837a0e1468538
Reviewed-on: https://chromium-review.googlesource.com/773460
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Jay Civelli <jcivelli@chromium.org>
Commit-Queue: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520316}
[modify] https://crrev.com/c0e3a8e5486d92bab1dbe36563eea6515ffe9d61/services/data_decoder/public/cpp/BUILD.gn
[modify] https://crrev.com/c0e3a8e5486d92bab1dbe36563eea6515ffe9d61/services/data_decoder/public/cpp/safe_xml_parser.cc
[modify] https://crrev.com/c0e3a8e5486d92bab1dbe36563eea6515ffe9d61/services/data_decoder/public/cpp/safe_xml_parser.h
[modify] https://crrev.com/c0e3a8e5486d92bab1dbe36563eea6515ffe9d61/services/data_decoder/public/cpp/safe_xml_parser_unittest.cc
[add] https://crrev.com/c0e3a8e5486d92bab1dbe36563eea6515ffe9d61/services/data_decoder/public/cpp/test_data_decoder_service.cc
[add] https://crrev.com/c0e3a8e5486d92bab1dbe36563eea6515ffe9d61/services/data_decoder/public/cpp/test_data_decoder_service.h
[modify] https://crrev.com/c0e3a8e5486d92bab1dbe36563eea6515ffe9d61/services/data_decoder/public/interfaces/xml_parser.mojom
[modify] https://crrev.com/c0e3a8e5486d92bab1dbe36563eea6515ffe9d61/services/data_decoder/xml_parser.cc
[add] https://crrev.com/c0e3a8e5486d92bab1dbe36563eea6515ffe9d61/services/data_decoder/xml_parser_fuzzer_corpus/input8
[modify] https://crrev.com/c0e3a8e5486d92bab1dbe36563eea6515ffe9d61/services/data_decoder/xml_parser_unittest.cc
[modify] https://crrev.com/c0e3a8e5486d92bab1dbe36563eea6515ffe9d61/third_party/libxml/chromium/libxml_utils.cc
[modify] https://crrev.com/c0e3a8e5486d92bab1dbe36563eea6515ffe9d61/third_party/libxml/chromium/libxml_utils.h

Sign in to add a comment