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

Issue 1689833002: Add ownership-transfer to histogram management calls. (Closed)

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

Description

Add ownership-transfer to histogram management calls. Both histogram-persistence and statistics-recorder manage ownership of histograms. This CL changes the interface to use scoped_ptr to explicitly document, with std::move, when the transfer of ownership is taking place. BUG= Done as part of https://codereview.chromium.org/1738063002/

Patch Set 1 #

Patch Set 2 : also update chromecast GroupedHistogram #

Patch Set 3 : rebased #

Patch Set 4 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -102 lines) Patch
M base/metrics/histogram.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M base/metrics/histogram.cc View 1 2 3 3 chunks +10 lines, -8 lines 0 comments Download
M base/metrics/histogram_persistence.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M base/metrics/histogram_persistence.cc View 1 2 3 10 chunks +25 lines, -22 lines 0 comments Download
M base/metrics/histogram_unittest.cc View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M base/metrics/sparse_histogram.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M base/metrics/statistics_recorder.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M base/metrics/statistics_recorder.cc View 1 2 3 3 chunks +13 lines, -3 lines 0 comments Download
M base/metrics/statistics_recorder_unittest.cc View 1 2 4 chunks +40 lines, -46 lines 0 comments Download
M chromecast/base/metrics/grouped_histogram.cc View 1 1 chunk +11 lines, -8 lines 0 comments Download

Messages

Total messages: 6 (3 generated)
bcwhite
Note: The changes to StaisticsRecorder are a bit complex. I can back those out and ...
4 years, 10 months ago (2016-02-10 22:42:46 UTC) #2
grt (UTC plus 2)
I'll leave it to you, Alexei. In general, I'm a fan of making ownership transfer ...
4 years, 10 months ago (2016-02-11 15:02:16 UTC) #3
bcwhite
4 years, 9 months ago (2016-02-27 19:28:47 UTC) #4
On 2016/02/11 15:02:16, grt wrote:
> I'll leave it to you, Alexei. In general, I'm a fan of making ownership
transfer
> explicit by use of scoped_ptr, so I like the direction.

Histogram changes now part of https://codereview.chromium.org/1738063002/

Statistics recorder part could still be done if so desired after other CL is
submitted and this one rebased.

Powered by Google App Engine
This is Rietveld 408576698