Skip to content

Commit

Permalink
[DevTools] Roll inspector_protocol (Chromium) (file split)
Browse files Browse the repository at this point in the history
New Revision: d020a9e614d4a5116a7c71f288c0340e282e1a6e
Upstream review: https://chromium-review.googlesource.com/c/deps/inspector_protocol/+/1907115

This splits the crdtp library (third party, rolled by a script)
into multiple header files. The remainder of the change are
mechanical adjustments.

TBR=caseq

Change-Id: I8ecf383b584d38a0fd4af91b8aac88a15f08c023
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1907770
Commit-Queue: Johannes Henkel <johannes@chromium.org>
Reviewed-by: Leonard Grey <lgrey@chromium.org>
Auto-Submit: Johannes Henkel <johannes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716251}
  • Loading branch information
Johannes Henkel authored and Commit Bot committed Nov 18, 2019
1 parent b0e3044 commit f562538
Show file tree
Hide file tree
Showing 40 changed files with 2,461 additions and 2,181 deletions.
2 changes: 1 addition & 1 deletion chrome/browser/devtools/chrome_devtools_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/browser/devtools_agent_host_client.h"
#include "content/public/browser/devtools_manager_delegate.h"
#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/json.h"

#if defined(OS_CHROMEOS)
#include "chrome/browser/devtools/protocol/window_manager_handler.h"
Expand Down
2 changes: 1 addition & 1 deletion components/ui_devtools/devtools_protocol_encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string>
#include <vector>

#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/json.h"

// Convenience adaptation of the conversion function
// crdtp::json::ConvertCBORToJSON, crdtp::json::ConvertJSONToCBOR.
Expand Down
23 changes: 8 additions & 15 deletions content/browser/devtools/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -123,23 +123,16 @@ proto_library("devtools_background_services_proto") {
]
}

source_set("inspector_protocol_encoding_test") {
source_set("inspector_protocol_crdtp_test") {
testonly = true
sources = [
"../../../third_party/inspector_protocol/crdtp/encoding_test.cc",
]
deps = [
"//base",
"//testing/gmock",
"//testing/gtest",
"//third_party/inspector_protocol:crdtp",
]
}

source_set("inspector_protocol_bindings_test") {
testonly = true
sources = [
"../../../third_party/inspector_protocol/crdtp/bindings_test.cc",
"../../../third_party/inspector_protocol/crdtp/cbor_test.cc",
"../../../third_party/inspector_protocol/crdtp/glue_test.cc",
"../../../third_party/inspector_protocol/crdtp/json_test.cc",
"../../../third_party/inspector_protocol/crdtp/span_test.cc",
"../../../third_party/inspector_protocol/crdtp/status_test.cc",
"../../../third_party/inspector_protocol/crdtp/test_platform.h",
"../../../third_party/inspector_protocol/crdtp/test_platform.cc",
]
deps = [
"//base",
Expand Down
2 changes: 1 addition & 1 deletion content/browser/devtools/devtools_pipe_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "content/public/browser/devtools_agent_host.h"
#include "content/public/common/content_switches.h"
#include "net/server/http_connection.h"
#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/cbor.h"

const size_t kReceiveBufferSizeForDevTools = 100 * 1024 * 1024; // 100Mb
const size_t kWritePacketSize = 1 << 16;
Expand Down
2 changes: 1 addition & 1 deletion content/browser/devtools/devtools_protocol_encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define CONTENT_BROWSER_DEVTOOLS_DEVTOOLS_PROTOCOL_ENCODING_H_

#include <memory>
#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/json.h"

// Convenience adaptations of the conversion functions
// crdtp::json::ConvertCBORToJSON crdtp::json::ConvertJDONToCBOR.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "content/browser/devtools/devtools_protocol_encoding.h"

#include <string>
#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/cbor.h"

// A corpus for this fuzzer is located in
// devtools_protocol_encoding_cbor_fuzzer_corpus.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "content/browser/devtools/devtools_protocol_encoding.h"

#include <string>
#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/json.h"

namespace content {

Expand Down
2 changes: 1 addition & 1 deletion content/browser/devtools/devtools_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/public/browser/devtools_external_agent_proxy_delegate.h"
#include "content/public/browser/devtools_manager_delegate.h"
#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/cbor.h"

namespace content {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion content/browser/devtools/inspector_fuzzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <memory>
#include <vector>

#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/cbor.h"

// Entry point for LibFuzzer.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
Expand Down
2 changes: 1 addition & 1 deletion content/browser/devtools/protocol/tracing_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#include "services/tracing/public/cpp/tracing_features.h"
#include "services/tracing/public/mojom/constants.mojom.h"
#include "services/tracing/public/mojom/perfetto_service.mojom.h"
#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/json.h"

#ifdef OS_ANDROID
#include "content/browser/renderer_host/compositor_impl_android.h"
Expand Down
3 changes: 1 addition & 2 deletions content/test/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -1950,8 +1950,7 @@ test("content_unittests") {
"//content/browser/background_fetch:background_fetch_proto",
"//content/browser/cache_storage:cache_storage_proto",
"//content/browser/devtools:devtools_background_services_proto",
"//content/browser/devtools:inspector_protocol_bindings_test",
"//content/browser/devtools:inspector_protocol_encoding_test",
"//content/browser/devtools:inspector_protocol_crdtp_test",
"//content/browser/dom_storage:local_storage_proto",
"//content/browser/notifications:notification_proto",
"//content/browser/service_worker:service_worker_proto",
Expand Down
2 changes: 1 addition & 1 deletion headless/lib/browser/protocol/headless_devtools_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "headless/lib/browser/protocol/headless_handler.h"
#include "headless/lib/browser/protocol/page_handler.h"
#include "headless/lib/browser/protocol/target_handler.h"
#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/json.h"

namespace {
// TODO(johannes): This is very similar to the code in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
#include "third_party/blink/renderer/platform/web_test_support.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
#include "third_party/blink/renderer/platform/wtf/text/string_utf8_adaptor.h"
#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/cbor.h"
#include "third_party/inspector_protocol/crdtp/json.h"

namespace blink {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

#include "third_party/blink/renderer/core/inspector/inspector_session_state.h"

#include "third_party/blink/renderer/core/inspector/protocol/Protocol.h"
#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/cbor.h"

namespace blink {
namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/inspector_protocol/crdtp/encoding.h"
#include "third_party/inspector_protocol/crdtp/json.h"

namespace blink {
class InspectorAgentState;
Expand Down
15 changes: 11 additions & 4 deletions third_party/inspector_protocol/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ import("//build/config/jumbo.gni")

jumbo_component("crdtp") {
sources = [
"crdtp/bindings.cc",
"crdtp/bindings.h",
"crdtp/encoding.cc",
"crdtp/encoding.h",
"crdtp/cbor.h",
"crdtp/export.h",
"crdtp/glue.h",
"crdtp/status.h",
"crdtp/json.h",
"crdtp/json_platform.h",
"crdtp/parser_handler.h",
"crdtp/span.h",
"crdtp/status.h",
"crdtp/cbor.cc",
"crdtp/json.cc",
"crdtp/status.cc",
]

defines = [ "CRDTP_IMPLEMENTATION" ]
Expand Down
2 changes: 1 addition & 1 deletion third_party/inspector_protocol/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# directly but this requires an exception here.

specific_include_rules = {
'^.*_test_helper\.h$': [
'^test_platform.*$': [
'+base',
'+testing/gtest/include',
'+testing/gmock/include',
Expand Down
2 changes: 1 addition & 1 deletion third_party/inspector_protocol/README.chromium
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Name: inspector protocol
Short Name: inspector_protocol
URL: https://chromium.googlesource.com/deps/inspector_protocol/
Version: 0
Revision: 112f668538cf71ee033fb7687e6dcdff46f95716
Revision: d020a9e614d4a5116a7c71f288c0340e282e1a6e
License: BSD
License File: LICENSE
Security Critical: yes
Expand Down
5 changes: 0 additions & 5 deletions third_party/inspector_protocol/crdtp/bindings.cc

This file was deleted.

16 changes: 0 additions & 16 deletions third_party/inspector_protocol/crdtp/bindings_test_helper.h

This file was deleted.

Loading

0 comments on commit f562538

Please sign in to comment.