Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Issue 734263003: Move data reduction proxy logic out of chrome and android webview network delegate (Closed)

Created:
6 years, 1 month ago by megjablon
Modified:
6 years ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Move data reduction proxy logic out of chrome and android webview network delegates In order to move the data reduction proxy logic from ChromeNetworkDelegate and AwNetworkDelegate to DataReductionProxyNetworkDelegate, pure virtual methods in NetworkDelegate move to the new subclass NetworkDelegateImpl. All subclasses of NetworkDelegate now subclass NetworkDelegateImpl. The DataReductionProxyNetworkDelegate subclasses WrappingNetworkDelegate. WrappingNetworkDelegate subclasses NetworkDelegateand and takes a NetworkDelegate in its constructor and owns it. For every override OnFoo, WrappingNetworkDelegate provides a protected virtual void OnFooInternal(), with an empty default implementation. DataReductionProxyNetworkDelegate subclasses WrappingNetworkDelegate and moves implementations from ChromeNetworkDelegate and AwNetworkDelegate inside the On*Internal() methods. BUG=429734 Committed: https://crrev.com/c1751458b9409f52c56b3f84d8226c57c39369d5 Cr-Commit-Position: refs/heads/master@{#307523}

Patch Set 1 #

Total comments: 60

Patch Set 2 : Addressing bengr comments #

Patch Set 3 : Adding tests #

Patch Set 4 : Rebase #

Patch Set 5 : Use SingleThreadTaskRunner instead of MessageLoopProxy #

Total comments: 35

Patch Set 6 : Addressing mmenke and jochen comments #

Total comments: 28

Patch Set 7 : Addressing bengr comments #

Patch Set 8 : Rebase and test fix #

Patch Set 9 : Adding inits to DRPNetworkDelegate #

Total comments: 33

Patch Set 10 : Fixing test and addressing mmenke comments #

Total comments: 11

Patch Set 11 : Addressing mmenke comments #

Total comments: 45

Patch Set 12 : Addressing comments #

Total comments: 43

Patch Set 13 : Addressing bengr comments #

Total comments: 2

Patch Set 14 : Rebase and one nit #

Patch Set 15 : Test fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1931 lines, -779 lines) Patch
M android_webview/browser/net/aw_network_delegate.h View 1 2 3 4 chunks +2 lines, -29 lines 0 comments Download
M android_webview/browser/net/aw_network_delegate.cc View 1 2 3 3 chunks +1 line, -16 lines 0 comments Download
M android_webview/browser/net/aw_url_request_context_getter.cc View 1 2 3 4 5 6 7 8 3 chunks +28 lines, -21 lines 0 comments Download
M chrome/browser/io_thread.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/io_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +18 lines, -16 lines 0 comments Download
M chrome/browser/net/chrome_extensions_network_delegate.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.h View 1 2 3 4 5 6 7 11 chunks +3 lines, -115 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 2 3 4 5 6 7 10 chunks +2 lines, -227 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +13 lines, -8 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +35 lines, -34 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +2 lines, -6 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/sync/one_click_signin_helper_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui.cc View 1 2 3 3 chunks +5 lines, -4 lines 0 comments Download
M chromecast/browser/cast_network_delegate.h View 2 chunks +2 lines, -2 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M components/cronet/android/cronet_url_request_context_adapter.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M components/cronet/android/url_request_context_adapter.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M components/data_reduction_proxy.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M components/data_reduction_proxy/core/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -5 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -2 lines 0 comments Download
A components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +171 lines, -0 lines 0 comments Download
A components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +252 lines, -0 lines 0 comments Download
A components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +310 lines, -0 lines 0 comments Download
M content/shell/browser/shell_network_delegate.h View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/shell/browser/shell_network_delegate.h View 1 chunk +2 lines, -2 lines 0 comments Download
A net/base/layered_network_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +171 lines, -0 lines 0 comments Download
A net/base/layered_network_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +274 lines, -0 lines 0 comments Download
A net/base/layered_network_delegate_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +389 lines, -0 lines 0 comments Download
M net/base/network_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +20 lines, -21 lines 0 comments Download
M net/base/network_delegate.cc View 1 2 3 1 chunk +0 lines, -104 lines 0 comments Download
A + net/base/network_delegate_impl.h View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +47 lines, -130 lines 0 comments Download
A net/base/network_delegate_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +115 lines, -0 lines 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -0 lines 0 comments Download
M net/proxy/network_delegate_error_observer_unittest.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M net/proxy/proxy_script_fetcher_impl_unittest.cc View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M net/proxy/proxy_service_unittest.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M net/url_request/url_request_context_builder.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_test_util.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 43 (13 generated)
megjablon
6 years, 1 month ago (2014-11-18 18:36:14 UTC) #2
bengr
https://codereview.chromium.org/734263003/diff/1/android_webview/browser/net/aw_url_request_context_getter.cc File android_webview/browser/net/aw_url_request_context_getter.cc (right): https://codereview.chromium.org/734263003/diff/1/android_webview/browser/net/aw_url_request_context_getter.cc#newcode243 android_webview/browser/net/aw_url_request_context_getter.cc:243: data_reduction_proxy_auth_request_handler_.reset( Can this be moved above the delegate construction ...
6 years, 1 month ago (2014-11-18 19:30:56 UTC) #3
megjablon
https://codereview.chromium.org/734263003/diff/1/android_webview/browser/net/aw_url_request_context_getter.cc File android_webview/browser/net/aw_url_request_context_getter.cc (right): https://codereview.chromium.org/734263003/diff/1/android_webview/browser/net/aw_url_request_context_getter.cc#newcode243 android_webview/browser/net/aw_url_request_context_getter.cc:243: data_reduction_proxy_auth_request_handler_.reset( On 2014/11/18 19:30:55, bengr wrote: > Can this ...
6 years, 1 month ago (2014-11-19 19:23:41 UTC) #4
megjablon
damienv: chromecast/* jamescook: extensions/* sgurun: android_webview/* jochen: components/components_tests.gyp content/* mmenke: net/* components/cronet/* chrome/* Thanks!
6 years ago (2014-11-25 22:20:31 UTC) #7
James Cook
extensions/shell lgtm
6 years ago (2014-11-25 23:41:59 UTC) #8
jochen (gone - plz use gerrit)
content and components lgtm https://codereview.chromium.org/734263003/diff/100001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h File components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h (right): https://codereview.chromium.org/734263003/diff/100001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h#newcode72 components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h:72: virtual ~DataReductionProxyNetworkDelegate() override; either virtual ...
6 years ago (2014-11-26 14:04:07 UTC) #10
mmenke
I haven't yet dug through the tests. May not get to them until next week. ...
6 years ago (2014-11-26 15:23:53 UTC) #11
megjablon
https://codereview.chromium.org/734263003/diff/100001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc (right): https://codereview.chromium.org/734263003/diff/100001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc#newcode65 components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc:65: } On 2014/11/26 15:23:52, mmenke wrote: > This should ...
6 years ago (2014-12-01 19:26:56 UTC) #12
bengr
https://codereview.chromium.org/734263003/diff/140001/android_webview/browser/net/aw_url_request_context_getter.cc File android_webview/browser/net/aw_url_request_context_getter.cc (right): https://codereview.chromium.org/734263003/diff/140001/android_webview/browser/net/aw_url_request_context_getter.cc#newcode221 android_webview/browser/net/aw_url_request_context_getter.cc:221: NULL, NULL, NULL, I don't understand this Init call. ...
6 years ago (2014-12-02 17:20:01 UTC) #14
megjablon
https://codereview.chromium.org/734263003/diff/140001/android_webview/browser/net/aw_url_request_context_getter.cc File android_webview/browser/net/aw_url_request_context_getter.cc (right): https://codereview.chromium.org/734263003/diff/140001/android_webview/browser/net/aw_url_request_context_getter.cc#newcode221 android_webview/browser/net/aw_url_request_context_getter.cc:221: NULL, NULL, NULL, On 2014/12/02 17:20:00, bengr wrote: > ...
6 years ago (2014-12-02 22:33:21 UTC) #16
mmenke
https://codereview.chromium.org/734263003/diff/250001/chrome/browser/io_thread.cc File chrome/browser/io_thread.cc (right): https://codereview.chromium.org/734263003/diff/250001/chrome/browser/io_thread.cc#newcode603 chrome/browser/io_thread.cc:603: // usage stats. nit: Don't use "we" in comments. ...
6 years ago (2014-12-03 18:50:39 UTC) #19
megjablon
https://codereview.chromium.org/734263003/diff/250001/chrome/browser/io_thread.cc File chrome/browser/io_thread.cc (right): https://codereview.chromium.org/734263003/diff/250001/chrome/browser/io_thread.cc#newcode603 chrome/browser/io_thread.cc:603: // usage stats. On 2014/12/03 18:50:38, mmenke wrote: > ...
6 years ago (2014-12-04 01:23:47 UTC) #22
mmenke
Want to do another pass over the net/ tests, hopefully later today, but I think ...
6 years ago (2014-12-04 19:20:07 UTC) #23
mmenke
https://codereview.chromium.org/734263003/diff/310001/chrome/browser/profiles/profile_impl_io_data.cc File chrome/browser/profiles/profile_impl_io_data.cc (right): https://codereview.chromium.org/734263003/diff/310001/chrome/browser/profiles/profile_impl_io_data.cc#newcode428 chrome/browser/profiles/profile_impl_io_data.cc:428: scoped_ptr<ChromeNetworkDelegate> chrome_network_delegate, On 2014/12/04 19:20:07, mmenke wrote: > On ...
6 years ago (2014-12-04 19:20:57 UTC) #24
megjablon
https://codereview.chromium.org/734263003/diff/310001/chrome/browser/profiles/profile_impl_io_data.cc File chrome/browser/profiles/profile_impl_io_data.cc (right): https://codereview.chromium.org/734263003/diff/310001/chrome/browser/profiles/profile_impl_io_data.cc#newcode122 chrome/browser/profiles/profile_impl_io_data.cc:122: io_data_->data_reduction_proxy_enabled_io()->Destroy(); On 2014/12/04 19:20:07, mmenke wrote: > Rather than ...
6 years ago (2014-12-04 20:31:01 UTC) #25
mmenke
LGTM https://codereview.chromium.org/734263003/diff/330001/chrome/browser/profiles/off_the_record_profile_io_data.cc File chrome/browser/profiles/off_the_record_profile_io_data.cc (right): https://codereview.chromium.org/734263003/diff/330001/chrome/browser/profiles/off_the_record_profile_io_data.cc#newcode203 chrome/browser/profiles/off_the_record_profile_io_data.cc:203: nit: Remove blank line https://codereview.chromium.org/734263003/diff/330001/chrome/browser/profiles/profile_impl_io_data.cc File chrome/browser/profiles/profile_impl_io_data.cc (right): ...
6 years ago (2014-12-04 20:50:57 UTC) #26
sgurun-gerrit only
https://codereview.chromium.org/734263003/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc (right): https://codereview.chromium.org/734263003/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc#newcode187 components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc:187: int64 received_content_length = request->received_response_content_length(); I think you should early ...
6 years ago (2014-12-04 22:16:30 UTC) #27
bengr
https://codereview.chromium.org/734263003/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc (right): https://codereview.chromium.org/734263003/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc#newcode146 components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc:146: on_resolve_proxy_handler_.Run(url, load_flags, nit: move these parameters to the next ...
6 years ago (2014-12-04 22:58:58 UTC) #28
megjablon
https://codereview.chromium.org/734263003/diff/330001/chrome/browser/profiles/off_the_record_profile_io_data.cc File chrome/browser/profiles/off_the_record_profile_io_data.cc (right): https://codereview.chromium.org/734263003/diff/330001/chrome/browser/profiles/off_the_record_profile_io_data.cc#newcode203 chrome/browser/profiles/off_the_record_profile_io_data.cc:203: On 2014/12/04 20:50:56, mmenke wrote: > nit: Remove blank ...
6 years ago (2014-12-05 22:24:21 UTC) #30
sgurun-gerrit only
https://codereview.chromium.org/734263003/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc (right): https://codereview.chromium.org/734263003/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc#newcode187 components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc:187: int64 received_content_length = request->received_response_content_length(); On 2014/12/05 22:24:20, megjablon wrote: ...
6 years ago (2014-12-05 22:41:30 UTC) #31
megjablon
https://codereview.chromium.org/734263003/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc (right): https://codereview.chromium.org/734263003/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc#newcode187 components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc:187: int64 received_content_length = request->received_response_content_length(); On 2014/12/05 22:41:30, sgurun wrote: ...
6 years ago (2014-12-06 00:37:22 UTC) #32
bengr
https://codereview.chromium.org/734263003/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc (right): https://codereview.chromium.org/734263003/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc#newcode39 components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc:39: #if defined(OS_ANDROID) On 2014/12/05 22:24:20, megjablon wrote: > On ...
6 years ago (2014-12-06 01:05:39 UTC) #33
megjablon
https://codereview.chromium.org/734263003/diff/370001/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc (right): https://codereview.chromium.org/734263003/diff/370001/components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc#newcode470 components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc:470: int received_content_length, On 2014/12/06 01:05:38, bengr wrote: > Can ...
6 years ago (2014-12-08 22:26:02 UTC) #35
bengr
lgtm with nits. https://codereview.chromium.org/734263003/diff/370001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc (right): https://codereview.chromium.org/734263003/diff/370001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc#newcode119 components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc:119: base::DictionaryValue* dict = new base::DictionaryValue(); On ...
6 years ago (2014-12-08 22:36:26 UTC) #36
megjablon
https://codereview.chromium.org/734263003/diff/410001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc (right): https://codereview.chromium.org/734263003/diff/410001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc#newcode111 components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc:111: scoped_refptr<base::MessageLoopProxy> message_loop_proxy() { On 2014/12/08 22:36:26, bengr wrote: > ...
6 years ago (2014-12-08 23:16:48 UTC) #37
lcwu1
lgtm on chromecast/.
6 years ago (2014-12-08 23:31:42 UTC) #38
sgurun-gerrit only
On 2014/12/08 23:31:42, lcwu1 wrote: > lgtm on chromecast/. aw lgtm
6 years ago (2014-12-09 00:12:48 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/734263003/450001
6 years ago (2014-12-09 18:31:54 UTC) #41
commit-bot: I haz the power
Committed patchset #15 (id:450001)
6 years ago (2014-12-09 19:47:19 UTC) #42
commit-bot: I haz the power
6 years ago (2014-12-09 19:48:06 UTC) #43
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/c1751458b9409f52c56b3f84d8226c57c39369d5
Cr-Commit-Position: refs/heads/master@{#307523}

Powered by Google App Engine
This is Rietveld 408576698