Split out DataReductionProxyEventCreator from DataReductionProxyEventStore.
commit7701efcbf44bc3be71b0e0a63618cd408920863d
authorjeremyim <jeremyim@chromium.org>
Wed, 22 Apr 2015 23:26:04 +0000 (22 16:26 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 22 Apr 2015 23:27:08 +0000 (22 23:27 +0000)
treead692791c864eb4cd3480d697ff5b0989a69f6d1
parentd44c208aa4ab397fc6531eae51cd39fb71c0e8f8
Split out DataReductionProxyEventCreator from DataReductionProxyEventStore.

Currently, the storage portion lives on the UI thread (to be read from
net_internals_ui.cc), but all calls for adding events occurs on the IO
thread. In order to maintain thread safety, it used to PostTask to
itself, but that introduces a lifetime problem per bug 472290.

The solution is to split the IO and UI thread portions (in this case
event collection and event storage) and use the existing DRP IO and
DRP Service classes to ensure posted tasks respect the lifetime of
the objects.

BUG=472290

Review URL: https://codereview.chromium.org/1075283004

Cr-Commit-Position: refs/heads/master@{#326396}
36 files changed:
components/data_reduction_proxy.gypi
components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol.h
components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h
components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.h
components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator.h
components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_test_utils.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_test_utils.h
components/data_reduction_proxy/core/browser/data_reduction_proxy_configurator_unittest.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h
components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h
components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc
components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h
components/data_reduction_proxy/core/common/BUILD.gn
components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.cc [new file with mode: 0644]
components/data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h [new file with mode: 0644]
components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h [new file with mode: 0644]
components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.cc [new file with mode: 0644]
components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.h [new file with mode: 0644]
components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc
components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h
components/data_reduction_proxy/core/common/data_reduction_proxy_event_store_unittest.cc
components/data_reduction_proxy/core/common/data_reduction_proxy_headers.cc
components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h
components/data_reduction_proxy/core/common/data_reduction_proxy_headers_unittest.cc