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

Issue 893003002: Data Reduction Proxy class ownership updates and Settings cleanup (Closed)

Created:
5 years, 10 months ago by jeremyim
Modified:
5 years, 10 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Class ownership changes: - DRPIOData is a container for IOData lifetime objects, and constructed first. - DataSaverService is a container for Profile/UI based lifetime objects, and constructed second. It can take raw pointers to DRPIOData, since DataSaverService is destroyed before DRPIOData. - DRPIOData (and its classes) then fed a WeakPtr to the DataSaverService. - DataSaverService is (temporarily) owned by DRPSettings (primarily because DRPChromeSettings is the KeyedService) - this will swap in a future CL. - During KeyedService shutdown, the WeakPtr is invalidated. Removal of redundant functionality in the DRPSettings: - I/O thread related functionality (Canary check, IP address change) now lives in the Config class, with calls into DataSaverService to use the URLFetcher - the Settings class no longer is aware of Params, and instead uses the Config class for retrieving information - this results in Params construction moving from Settings -> DRP IO/Data - Certain information which is exposed to the UI (via the Settings class) is now cached after being retrieved from the Config class (for thread safety) BUG=452773 Committed: https://crrev.com/f917e431fd15598c0e28dbc9a39ac408272548a4 Cr-Commit-Position: refs/heads/master@{#317432}

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Total comments: 37

Patch Set 3 : CR updates #

Patch Set 4 : #

Total comments: 9

Patch Set 5 : CR updates #

Patch Set 6 : Fix ownership issue in DataReductionProxyTestContext #

Patch Set 7 : Fix whitespace removal #

Total comments: 2

Patch Set 8 : Ownership changes, rebase to head #

Patch Set 9 : Rebase #

Total comments: 22

Patch Set 10 : Rebase #

Total comments: 47

Patch Set 11 : bengr CR comments #

Patch Set 12 : Rebase #

Total comments: 2

Patch Set 13 : sgurun CR comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+967 lines, -1613 lines) Patch
M android_webview/browser/aw_browser_context.h View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -3 lines 0 comments Download
M android_webview/browser/aw_browser_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +21 lines, -33 lines 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -8 lines 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +24 lines, -33 lines 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +13 lines, -16 lines 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +33 lines, -13 lines 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.cc View 2 chunks +1 line, -28 lines 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc View 1 2 3 4 5 6 7 8 9 4 chunks +13 lines, -48 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 3 chunks +12 lines, -21 lines 0 comments Download
M components/data_reduction_proxy.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M components/data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M components/data_reduction_proxy/core/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h View 1 2 3 4 5 6 7 8 9 10 8 chunks +51 lines, -39 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc View 1 2 3 4 5 6 7 8 9 10 10 chunks +99 lines, -66 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.h View 1 2 3 4 5 6 7 8 9 3 chunks +38 lines, -17 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +38 lines, -24 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc View 1 2 3 4 5 6 7 8 9 10 chunks +29 lines, -17 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +22 lines, -36 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +23 lines, -37 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +4 lines, -28 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -7 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc View 1 2 3 4 5 6 7 8 9 4 chunks +14 lines, -9 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc View 1 2 3 4 5 6 7 8 9 5 chunks +14 lines, -13 lines 0 comments Download
A components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +106 lines, -0 lines 0 comments Download
A components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +85 lines, -0 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +57 lines, -141 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 chunks +54 lines, -374 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +14 lines, -84 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +43 lines, -172 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 11 chunks +37 lines, -265 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h View 1 2 3 4 5 6 7 8 9 10 7 chunks +22 lines, -12 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +49 lines, -31 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.h View 1 2 3 4 5 6 7 8 9 4 chunks +6 lines, -6 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.cc View 1 2 3 4 5 6 7 8 9 4 chunks +5 lines, -4 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +13 lines, -14 lines 0 comments Download

Messages

Total messages: 46 (13 generated)
jeremyim
PTAL. =)
5 years, 10 months ago (2015-02-02 18:23:42 UTC) #2
bengr
On 2015/02/02 18:23:42, jeremyim wrote: > PTAL. =) Looking. For now, please change the CL ...
5 years, 10 months ago (2015-02-02 19:48:36 UTC) #3
bengr
The formatting of your CL comment is off. I add my own line breaks when ...
5 years, 10 months ago (2015-02-03 21:51:58 UTC) #4
jeremyim
https://codereview.chromium.org/893003002/diff/20001/android_webview/browser/aw_browser_context.cc File android_webview/browser/aw_browser_context.cc (right): https://codereview.chromium.org/893003002/diff/20001/android_webview/browser/aw_browser_context.cc#newcode279 android_webview/browser/aw_browser_context.cc:279: data_reduction_proxy_io_data_->InitURLRequestContext(GetRequestContext()); On 2015/02/03 21:51:57, bengr wrote: > Why can't ...
5 years, 10 months ago (2015-02-04 01:31:21 UTC) #6
bengr
https://codereview.chromium.org/893003002/diff/20001/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc (right): https://codereview.chromium.org/893003002/diff/20001/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc#newcode83 components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc:83: alternative_allowed_ = config_->params()->alternative_allowed(); On 2015/02/04 01:31:21, jeremyim wrote: > ...
5 years, 10 months ago (2015-02-05 00:46:02 UTC) #7
jeremyim
https://codereview.chromium.org/893003002/diff/80001/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc File chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc (right): https://codereview.chromium.org/893003002/diff/80001/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc#newcode66 chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc:66: #if defined(OS_ANDROID) On 2015/02/05 00:46:02, bengr wrote: > This ...
5 years, 10 months ago (2015-02-05 00:59:52 UTC) #8
bengr
lgtm https://codereview.chromium.org/893003002/diff/80001/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc File chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc (right): https://codereview.chromium.org/893003002/diff/80001/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc#newcode66 chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc:66: #if defined(OS_ANDROID) On 2015/02/05 00:59:52, jeremyim wrote: > ...
5 years, 10 months ago (2015-02-05 01:35:12 UTC) #9
jeremyim
PTAL =) mmenke => profile_impl_io_data.cc sgurun => aw_browser_context.cc
5 years, 10 months ago (2015-02-05 01:37:24 UTC) #11
mmenke
https://codereview.chromium.org/893003002/diff/140001/chrome/browser/profiles/profile_impl_io_data.cc File chrome/browser/profiles/profile_impl_io_data.cc (right): https://codereview.chromium.org/893003002/diff/140001/chrome/browser/profiles/profile_impl_io_data.cc#newcode183 chrome/browser/profiles/profile_impl_io_data.cc:183: profile_->GetRequestContext()); This circular dependency seems weird and ugly.... The ...
5 years, 10 months ago (2015-02-05 15:40:54 UTC) #13
jeremyim
https://codereview.chromium.org/893003002/diff/140001/chrome/browser/profiles/profile_impl_io_data.cc File chrome/browser/profiles/profile_impl_io_data.cc (right): https://codereview.chromium.org/893003002/diff/140001/chrome/browser/profiles/profile_impl_io_data.cc#newcode183 chrome/browser/profiles/profile_impl_io_data.cc:183: profile_->GetRequestContext()); On 2015/02/05 15:40:53, mmenke wrote: > This circular ...
5 years, 10 months ago (2015-02-05 17:47:59 UTC) #14
mmenke
On 2015/02/05 17:47:59, jeremyim wrote: > https://codereview.chromium.org/893003002/diff/140001/chrome/browser/profiles/profile_impl_io_data.cc > File chrome/browser/profiles/profile_impl_io_data.cc (right): > > https://codereview.chromium.org/893003002/diff/140001/chrome/browser/profiles/profile_impl_io_data.cc#newcode183 > ...
5 years, 10 months ago (2015-02-05 17:51:24 UTC) #15
mmenke
On 2015/02/05 17:51:24, mmenke wrote: > On 2015/02/05 17:47:59, jeremyim wrote: > > > https://codereview.chromium.org/893003002/diff/140001/chrome/browser/profiles/profile_impl_io_data.cc ...
5 years, 10 months ago (2015-02-07 02:03:34 UTC) #16
jeremyim
A pretty big round of updates, after rebasing to head to grab some recent DRP ...
5 years, 10 months ago (2015-02-13 23:30:26 UTC) #18
bengr
On 2015/02/13 23:30:26, jeremyim wrote: > A pretty big round of updates, after rebasing to ...
5 years, 10 months ago (2015-02-13 23:39:51 UTC) #19
mmenke
profiles/ LGTM https://codereview.chromium.org/893003002/diff/220001/chrome/browser/profiles/profile_impl_io_data.cc File chrome/browser/profiles/profile_impl_io_data.cc (right): https://codereview.chromium.org/893003002/diff/220001/chrome/browser/profiles/profile_impl_io_data.cc#newcode168 chrome/browser/profiles/profile_impl_io_data.cc:168: ChromeNetLog* const net_log = g_browser_process->io_thread()->net_log(); optional: Suggest ...
5 years, 10 months ago (2015-02-17 17:03:26 UTC) #21
bengr
https://codereview.chromium.org/893003002/diff/220001/android_webview/browser/aw_browser_context.cc File android_webview/browser/aw_browser_context.cc (right): https://codereview.chromium.org/893003002/diff/220001/android_webview/browser/aw_browser_context.cc#newcode368 android_webview/browser/aw_browser_context.cc:368: DCHECK(GetDataReductionProxySettings()->SaverService()); Cute, but I'd still call this "DataSaverService() or ...
5 years, 10 months ago (2015-02-17 18:10:24 UTC) #22
jeremyim
https://codereview.chromium.org/893003002/diff/220001/android_webview/browser/aw_browser_context.cc File android_webview/browser/aw_browser_context.cc (right): https://codereview.chromium.org/893003002/diff/220001/android_webview/browser/aw_browser_context.cc#newcode368 android_webview/browser/aw_browser_context.cc:368: DCHECK(GetDataReductionProxySettings()->SaverService()); On 2015/02/17 18:10:24, bengr wrote: > Cute, but ...
5 years, 10 months ago (2015-02-19 21:03:44 UTC) #26
bengr
https://codereview.chromium.org/893003002/diff/280001/android_webview/browser/aw_browser_context.cc File android_webview/browser/aw_browser_context.cc (right): https://codereview.chromium.org/893003002/diff/280001/android_webview/browser/aw_browser_context.cc#newcode369 android_webview/browser/aw_browser_context.cc:369: DCHECK(GetDataReductionProxySettings()->data_reduction_proxy_service()); nit: You could introduce a local to hold ...
5 years, 10 months ago (2015-02-20 00:00:37 UTC) #27
jeremyim
https://codereview.chromium.org/893003002/diff/280001/android_webview/browser/aw_browser_context.cc File android_webview/browser/aw_browser_context.cc (right): https://codereview.chromium.org/893003002/diff/280001/android_webview/browser/aw_browser_context.cc#newcode369 android_webview/browser/aw_browser_context.cc:369: DCHECK(GetDataReductionProxySettings()->data_reduction_proxy_service()); On 2015/02/20 00:00:36, bengr wrote: > nit: You ...
5 years, 10 months ago (2015-02-20 02:17:17 UTC) #28
jeremyim
+tbansal for the rebase which included his QUIC work in the following files: aw_browser_context.cc data_reduction_proxy_chrome_io_data.* ...
5 years, 10 months ago (2015-02-20 17:42:47 UTC) #31
tbansal1
On 2015/02/20 17:42:47, jeremyim wrote: > +tbansal for the rebase which included his QUIC work ...
5 years, 10 months ago (2015-02-20 18:06:32 UTC) #32
bengr
lgtm, but please address the one comment. https://codereview.chromium.org/893003002/diff/280001/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc (right): https://codereview.chromium.org/893003002/diff/280001/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc#newcode157 components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc:157: if (!io_task_runner_->BelongsToCurrentThread()) ...
5 years, 10 months ago (2015-02-20 20:26:45 UTC) #33
jeremyim
https://codereview.chromium.org/893003002/diff/280001/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc (right): https://codereview.chromium.org/893003002/diff/280001/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc#newcode157 components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc:157: if (!io_task_runner_->BelongsToCurrentThread()) { On 2015/02/20 20:26:45, bengr wrote: > ...
5 years, 10 months ago (2015-02-20 21:03:02 UTC) #34
sgurun-gerrit only
On 2015/02/20 21:03:02, jeremyim wrote: > https://codereview.chromium.org/893003002/diff/280001/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc > File components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc > (right): > > https://codereview.chromium.org/893003002/diff/280001/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc#newcode157 ...
5 years, 10 months ago (2015-02-20 21:53:18 UTC) #35
sgurun-gerrit only
On 2015/02/20 21:03:02, jeremyim wrote: > https://codereview.chromium.org/893003002/diff/280001/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc > File components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc > (right): > > https://codereview.chromium.org/893003002/diff/280001/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc#newcode157 ...
5 years, 10 months ago (2015-02-20 21:53:18 UTC) #36
sgurun-gerrit only
https://codereview.chromium.org/893003002/diff/340001/android_webview/browser/aw_browser_context.cc File android_webview/browser/aw_browser_context.cc (right): https://codereview.chromium.org/893003002/diff/340001/android_webview/browser/aw_browser_context.cc#newcode41 android_webview/browser/aw_browser_context.cc:41: class DataReductionProxyConfigurator; remove.
5 years, 10 months ago (2015-02-20 21:53:28 UTC) #37
sgurun-gerrit only
5 years, 10 months ago (2015-02-20 21:53:32 UTC) #38
jeremyim
https://codereview.chromium.org/893003002/diff/340001/android_webview/browser/aw_browser_context.cc File android_webview/browser/aw_browser_context.cc (right): https://codereview.chromium.org/893003002/diff/340001/android_webview/browser/aw_browser_context.cc#newcode41 android_webview/browser/aw_browser_context.cc:41: class DataReductionProxyConfigurator; On 2015/02/20 21:53:28, sgurun wrote: > remove. ...
5 years, 10 months ago (2015-02-20 22:04:14 UTC) #40
sgurun-gerrit only
On 2015/02/20 22:04:14, jeremyim wrote: > https://codereview.chromium.org/893003002/diff/340001/android_webview/browser/aw_browser_context.cc > File android_webview/browser/aw_browser_context.cc (right): > > https://codereview.chromium.org/893003002/diff/340001/android_webview/browser/aw_browser_context.cc#newcode41 > ...
5 years, 10 months ago (2015-02-20 22:06:22 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/893003002/360001
5 years, 10 months ago (2015-02-20 22:08:20 UTC) #43
jeremyim
Thank you everyone for your feedback and comments!
5 years, 10 months ago (2015-02-20 22:08:54 UTC) #44
commit-bot: I haz the power
Committed patchset #13 (id:360001)
5 years, 10 months ago (2015-02-20 22:49:57 UTC) #45
commit-bot: I haz the power
5 years, 10 months ago (2015-02-20 22:50:33 UTC) #46
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/f917e431fd15598c0e28dbc9a39ac408272548a4
Cr-Commit-Position: refs/heads/master@{#317432}

Powered by Google App Engine
This is Rietveld 408576698