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

Issue 888713002: DataReductionProxyStatisticsPrefs should support WeakPtr (Closed)

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

Description

DataReductionProxyStatisticsPrefs should support WeakPtr The DRPStatisticsPrefs object is referenced via a raw pointer in DRPNetworkDelegate and DRPSettings. It should instead be referenced via WeakPtr. BUG=453155, 455559, 444939 Committed: https://crrev.com/149bd770d674e8125f81cd649a8deece3a851682 Cr-Commit-Position: refs/heads/master@{#315419} Committed: https://crrev.com/85594ccf495b97ccd4642dd5f5ab98e31d1d2003 Cr-Commit-Position: refs/heads/master@{#315621}

Patch Set 1 : #

Total comments: 1

Patch Set 2 : Rebase #

Patch Set 3 : DRPSettings owns DRPStatisticsPrefs #

Total comments: 10

Patch Set 4 : Addressing comments #

Patch Set 5 : Rebase #

Total comments: 38

Patch Set 6 : IOData temporarily owns StatisticsPrefs and rebase #

Total comments: 11

Patch Set 7 : IOData getter renames #

Patch Set 8 : Rebase #

Total comments: 2

Patch Set 9 : Removed IOData statistics prefs getter and fixed Setting's getter #

Total comments: 1

Patch Set 10 : Webview fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+334 lines, -289 lines) Patch
M android_webview/browser/aw_browser_context.cc View 1 2 3 4 5 6 4 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc View 1 2 3 4 5 2 chunks +1 line, -4 lines 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc View 1 2 3 4 5 2 chunks +12 lines, -1 line 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 4 chunks +10 lines, -10 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 6 chunks +17 lines, -19 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 2 chunks +3 lines, -7 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.h View 1 chunk +0 lines, -8 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc View 1 chunk +0 lines, -28 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics_unittest.cc View 1 chunk +0 lines, -36 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h View 5 chunks +14 lines, -2 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc View 1 2 4 chunks +35 lines, -8 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 12 chunks +163 lines, -133 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 4 chunks +15 lines, -5 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 2 chunks +22 lines, -2 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h View 1 2 3 4 5 2 chunks +1 line, -1 line 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc View 1 2 3 4 5 4 chunks +14 lines, -7 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.cc View 1 2 3 4 5 4 chunks +8 lines, -7 lines 0 comments Download

Messages

Total messages: 41 (19 generated)
megjablon
https://codereview.chromium.org/888713002/diff/20001/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/888713002/diff/20001/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc#newcode463 components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc:463: data_reduction_proxy::prefs::kDataReductionProxyEnabled, false); This is copied from drp_metrics_unittest. Any suggestions ...
5 years, 10 months ago (2015-01-29 20:20:24 UTC) #3
bengr
On 2015/01/29 20:20:24, megjablon wrote: > https://codereview.chromium.org/888713002/diff/20001/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): > > ...
5 years, 10 months ago (2015-01-30 17:48:10 UTC) #4
megjablon
DRPSettings now owns DRPStatisticsPrefs
5 years, 10 months ago (2015-02-03 19:57:59 UTC) #13
bengr
https://codereview.chromium.org/888713002/diff/210001/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/888713002/diff/210001/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc#newcode47 chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc:47: scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>( #include "base/memory/scoped_ptr.h" #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h" https://codereview.chromium.org/888713002/diff/210001/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc File chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc (right): ...
5 years, 10 months ago (2015-02-03 23:51:17 UTC) #14
bengr
https://codereview.chromium.org/888713002/diff/210001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc (right): https://codereview.chromium.org/888713002/diff/210001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc#newcode94 components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc:94: settings_->SetDataReductionProxyStatisticsPrefs( On 2015/02/03 23:51:17, bengr wrote: > This shouldn't ...
5 years, 10 months ago (2015-02-04 00:06:06 UTC) #15
megjablon
https://codereview.chromium.org/888713002/diff/210001/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/888713002/diff/210001/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc#newcode47 chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc:47: scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>( On 2015/02/03 23:51:17, bengr wrote: > #include "base/memory/scoped_ptr.h" ...
5 years, 10 months ago (2015-02-04 18:47:54 UTC) #17
bengr
https://codereview.chromium.org/888713002/diff/270001/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/888713002/diff/270001/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc#newcode14 chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc:14: #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h" No longer needed. https://codereview.chromium.org/888713002/diff/270001/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc File chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc (right): ...
5 years, 10 months ago (2015-02-04 23:39:11 UTC) #18
megjablon
https://codereview.chromium.org/888713002/diff/270001/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/888713002/diff/270001/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc#newcode14 chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_io_data.cc:14: #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h" On 2015/02/04 23:39:10, bengr wrote: > No ...
5 years, 10 months ago (2015-02-06 23:40:42 UTC) #21
bengr
https://codereview.chromium.org/888713002/diff/270001/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc (right): https://codereview.chromium.org/888713002/diff/270001/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc#newcode90 components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc:90: &pref_service_, On 2015/02/06 23:40:42, megjablon wrote: > On 2015/02/04 ...
5 years, 10 months ago (2015-02-06 23:56:15 UTC) #22
bengr
https://codereview.chromium.org/888713002/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc (right): https://codereview.chromium.org/888713002/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc#newcode81 components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc:81: DataReductionProxyIOData::GetDataReductionProxyStatisticsPrefs() { On 2015/02/06 23:56:15, bengr wrote: > Why ...
5 years, 10 months ago (2015-02-07 00:21:54 UTC) #23
megjablon
https://codereview.chromium.org/888713002/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc (right): https://codereview.chromium.org/888713002/diff/330001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc#newcode81 components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc:81: DataReductionProxyIOData::GetDataReductionProxyStatisticsPrefs() { On 2015/02/06 23:56:15, bengr wrote: > Why ...
5 years, 10 months ago (2015-02-07 00:48:29 UTC) #25
bengr
lgtm with one issue. https://codereview.chromium.org/888713002/diff/390001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h File components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h (right): https://codereview.chromium.org/888713002/diff/390001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h#newcode58 components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h:58: base::WeakPtr<DataReductionProxyStatisticsPrefs> statistics_prefs(); #include "base/memory/weak_ptr.h"
5 years, 10 months ago (2015-02-07 01:57:44 UTC) #26
megjablon
sgurun: aw_browser_context.cc mmenke: please look at ownership https://codereview.chromium.org/888713002/diff/390001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h File components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h (right): https://codereview.chromium.org/888713002/diff/390001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h#newcode58 components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h:58: base::WeakPtr<DataReductionProxyStatisticsPrefs> statistics_prefs(); ...
5 years, 10 months ago (2015-02-07 03:18:45 UTC) #30
mmenke
https://codereview.chromium.org/888713002/diff/430001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc File components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc (right): https://codereview.chromium.org/888713002/diff/430001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc#newcode82 components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc:82: return temporary_statistics_prefs_.Pass(); This temporary ownership thing seems ugly. The ...
5 years, 10 months ago (2015-02-09 18:33:57 UTC) #31
sgurun-gerrit only
On 2015/02/09 18:33:57, mmenke wrote: > https://codereview.chromium.org/888713002/diff/430001/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc > File > components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc > (right): > > ...
5 years, 10 months ago (2015-02-09 22:07:15 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/888713002/450001
5 years, 10 months ago (2015-02-09 22:39:10 UTC) #34
commit-bot: I haz the power
Committed patchset #10 (id:450001)
5 years, 10 months ago (2015-02-09 22:44:19 UTC) #35
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/149bd770d674e8125f81cd649a8deece3a851682 Cr-Commit-Position: refs/heads/master@{#315419}
5 years, 10 months ago (2015-02-09 22:46:18 UTC) #36
jiayl
A revert of this CL (patchset #10 id:450001) has been created in https://codereview.chromium.org/896713003/ by jiayl@chromium.org. ...
5 years, 10 months ago (2015-02-09 23:19:30 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/888713002/450001
5 years, 10 months ago (2015-02-10 19:32:41 UTC) #39
commit-bot: I haz the power
Committed patchset #10 (id:450001)
5 years, 10 months ago (2015-02-10 20:06:47 UTC) #40
commit-bot: I haz the power
5 years, 10 months ago (2015-02-10 20:07:08 UTC) #41
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/85594ccf495b97ccd4642dd5f5ab98e31d1d2003
Cr-Commit-Position: refs/heads/master@{#315621}

Powered by Google App Engine
This is Rietveld 408576698