Skip to content

Commit

Permalink
Introduce new sync method
Browse files Browse the repository at this point in the history
  • Loading branch information
hodduc committed Jun 15, 2016
1 parent e3eec2f commit 07f7492
Show file tree
Hide file tree
Showing 22 changed files with 872 additions and 815 deletions.
40 changes: 36 additions & 4 deletions CMakeLists.txt
Expand Up @@ -151,13 +151,10 @@ set(
src/net/quic/quic_crypto_client_stream.cc
src/net/quic/quic_server_id.cc
src/net/quic/quic_simple_buffer_allocator.cc
src/net/quic/proto/cached_network_parameters.pb.cc
src/net/quic/proto/source_address_token.pb.cc
src/net/quic/quic_stream_sequencer_buffer.cc

src/net/base/int128.cc
src/net/base/escape.cc
src/net/base/io_buffer.cc
src/net/base/net_errors.cc
src/net/base/ip_address.cc
src/net/base/ip_address_number.cc
Expand Down Expand Up @@ -253,7 +250,6 @@ set(
src/base/time/time.cc
src/base/synchronization/lock.cc
src/base/synchronization/lock_impl_posix.cc
src/base/synchronization/condition_variable_posix.cc
src/base/strings/sys_string_conversions_posix.cc
src/base/strings/string_piece.cc
src/base/strings/string_util.cc
Expand Down Expand Up @@ -348,10 +344,46 @@ set(
src/url/third_party/mozilla/url_parse.cc
)

set(
PROTO_SOURCES

src/net/quic/proto/cached_network_parameters.proto
src/net/quic/proto/source_address_token.proto
)

find_package(Protobuf REQUIRED)

set(GENERATE_ROOT ${CMAKE_CURRENT_SOURCE_DIR})

foreach(FIL ${PROTO_SOURCES})
get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
get_filename_component(ABS_PATH ${ABS_FIL} PATH)
get_filename_component(FIL_WE ${FIL} NAME_WE)
get_filename_component(DIRC ${FIL} DIRECTORY)

list(APPEND PROTO_RESULTS "${GENERATE_ROOT}/${DIRC}/${FIL_WE}.pb.cc")
list(APPEND PROTO_RESULTS "${GENERATE_ROOT}/${DIRC}/${FIL_WE}.pb.h")

add_custom_command(
OUTPUT
"${GENERATE_ROOT}/${DIRC}/${FIL_WE}.pb.cc"
"${GENERATE_ROOT}/${DIRC}/${FIL_WE}.pb.h"
COMMAND ${PROTOBUF_PROTOC_EXECUTABLE}
ARGS --cpp_out ${GENERATE_ROOT}/${DIRC} -I${ABS_PATH} ${ABS_FIL}
DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE}
VERBATIM )

endforeach()

set_source_files_properties(${PROTO_RESUTS} PROPERTIES GENERATED TRUE)

include_directories(${GENERATE_ROOT}/src)

add_library(
quic
STATIC

${PROTO_RESULTS}
${NET_SOURCES}
${BASE_SOURCES}
${CRYPTO_SOURCES}
Expand Down
93 changes: 23 additions & 70 deletions DEPS
Expand Up @@ -4,77 +4,33 @@
# START #
{
"chromium_revision": "192da0f866b250d8a674a7dd400ff2a5b6a01ac8",
"automatic_dependency_common_exclude": [
"dependency_exclude": [
"zconf.h",
"modp_b64.h",
"modp_b64_data.h",
"base/debug/debugger.h",
"base/sequence_checker.h",
"base/files/file.h",
"base/tracked_objects.h",
"cached_network_parameters.pb.h",
"base/feature_list.h",
"base/metrics/field_trial.h"
"base/metrics/field_trial.h",
"base/sys_info.h",
"net/ssl/ssl_info.h",
"net/base/host_port_pair.h",
"net/base/registry_controlled_domains/registry_controlled_domain.h"
],
"automatic_dependency": [
{
"from": "base/threading/platform_thread_posix.cc"
},
{
"from": "base/threading/platform_thread_linux.cc"
},
{
"from": "base/threading/platform_thread_freebsd.cc"
},
{
"from": "net/quic/quic_connection.cc",
"exclude": [
"net/base/registry_controlled_domains/registry_controlled_domain.h"
]
},
{
"from": "net/quic/quic_session.cc",
"exclude": [
"net/ssl/ssl_info.h",
"net/spdy/spdy_header_block.h",
"net/base/registry_controlled_domains/registry_controlled_domain.h"
]
},
{
"from": "net/quic/quic_client_session_base.cc",
"exclude": [
"zconf.h",
"net/ssl/ssl_info.h",
"net/spdy/spdy_header_block.h",
"net/base/host_port_pair.h",
"net/base/registry_controlled_domains/registry_controlled_domain.h"
]
},
{
"from": "net/quic/quic_crypto_client_stream.cc",
"exclude": [
"zconf.h",
"net/ssl/ssl_info.h",
"net/spdy/spdy_header_block.h",
"net/base/host_port_pair.h",
"net/base/registry_controlled_domains/registry_controlled_domain.h"
]
},
{
"from": "net/quic/quic_crypto_server_stream.cc",
"exclude": [
"source_address_token.pb.h",
"zconf.h",
"net/ssl/ssl_info.h",
"net/spdy/spdy_header_block.h",
"modp_b64.h",
"modp_b64_data.h",
"net/base/registry_controlled_domains/registry_controlled_domain.h"
]
},
{
"from": "base/strings/sys_string_conversions_mac.mm"
},
{
"from": "net/base/io_buffer.h"
}
"net/quic/quic_connection.cc",
"net/quic/quic_session.cc",
"net/quic/quic_client_session_base.cc",
"net/quic/quic_crypto_client_stream.cc",
"net/quic/quic_crypto_server_stream.cc",
"net/base/io_buffer.cc",
"base/strings/sys_string_conversions_mac.mm",
"base/threading/platform_thread_posix.cc",
"base/threading/platform_thread_linux.cc",
"base/threading/platform_thread_freebsd.cc",
"base/callback_helpers.cc"
],
"manual_dependency": [
{
Expand All @@ -88,9 +44,6 @@
"target": [
"LICENSE",
"AUTHORS",
"base/atomicops_internals_portable.*",
"base/callback_helpers.h",
"base/callback_helpers.cc",
"base/cancelable_callback.h",
"base/rand_util_posix.cc",
"base/sequence_checker.h",
Expand All @@ -106,8 +59,6 @@
"base/threading/thread_local_posix.cc",
"base/threading/platform_thread_mac.mm",
"base/synchronization/lock_impl_posix.cc",
"base/synchronization/condition_variable.h",
"base/synchronization/condition_variable_posix.cc",
"base/files/file_path_constants.cc",
"base/process/process_handle_posix.cc",
"net/base/completion_callback.h",
Expand All @@ -125,6 +76,7 @@
"base/mac/scoped_mach_port.h",
"base/time/time_mac.cc",
"base/feature_list.h",
"base/sys_info.h",
"third_party/zlib/*.c",
"third_party/zlib/*.h",
"url/url_canon_*.cc",
Expand All @@ -134,7 +86,8 @@
{
"action": "copydir",
"target": [
"third_party/protobuf"
"third_party/protobuf",
"net/quic/proto"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -89,10 +89,10 @@ If you want to apply upstream changes,
2. Build QUIC server: `cd out/Debug; ninja quic_server`
3. Update "chromium_revision" var at DEPS to your chromium source code
revision.
4. Do `./manage.py sync --without-patches <CHROMIUM_GIT_ROOT>`
4. Do `./sync.py <CHROMIUM_GIT_ROOT>`
All necessary files will be updated to new ones without patches applied.
5. Temporarily commit here.
6. Do `./manage.py sync <CHROMIUM_GIT_ROOT>`
6. Do `./sync.py <CHROMIUM_GIT_ROOT>`--patch
All the patches will be applied. Some patches will be rejected.
7. If there is any patch collision, manually apply the rejected patches.
Open the `*.rej` files and carefully apply the rejected hunks manually.
Expand Down

0 comments on commit 07f7492

Please sign in to comment.