Chromium Code Reviews
DescriptionAllow PolicyLoadStatusSample to override reporting method
PolicyLoadStatusSample reports stats to base::LinearHistogram by
default. However, when used from libchrome in Chrome OS, this does
not work and causes memory leaks. This CL introduces PolicyLoadStatusSampler, which just gathers samples without doing anything with them, and its derived class PolicyLoadStatusAutoSubmitter, which sends them to base::LinearHistogram in its destructor and matches the old behavior. The slightly different name '*SampleR' should prevent accidental usage. Chrome OS can introduce its own submitter class or use the sampler class to dispose samples.
BUG=717888
TEST=Added test and ran it
Review-Url: https://codereview.chromium.org/2860973002
Cr-Commit-Position: refs/heads/master@{#469654}
Committed: https://chromium.googlesource.com/chromium/src/+/6410def39290ed829e0d56b92ab03ddd985a0c04
Patch Set 1 #Patch Set 2 : Change lambda bind to a more classical bind. #
Total comments: 2
Patch Set 3 : Changed callback implementation to class hierarchy implementation. #
Total comments: 8
Patch Set 4 : Cleanups and class rename. #Messages
Total messages: 26 (15 generated)
|