summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_thread.cc
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-29 15:18:10 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-29 15:18:10 +0000
commitcac267c7b19dbe68dd36a2f4d206e1fa9f530048 (patch)
tree2dc638aefc766e5d2d279f5b1e22928a875dcb55 /content/browser/browser_thread.cc
parent57c9ae399f80f00b533aa92c9eafeee748aa3b1c (diff)
downloadchromium_src-cac267c7b19dbe68dd36a2f4d206e1fa9f530048.zip
chromium_src-cac267c7b19dbe68dd36a2f4d206e1fa9f530048.tar.gz
chromium_src-cac267c7b19dbe68dd36a2f4d206e1fa9f530048.tar.bz2
Factor a log management helper out of MetricsService
This factors the details of the log transitions between current, staged (previously called pending; renamed for clarity), and unsent (i.e., to-be-stored) log, and all the encoding/compression involved in those transitions, into a helper class: MetricsLogManager. Also simplifies the state machine slightly by combining two states (SEND_OLD_INITIAL_LOGS and SENDING_OLD_LOGS) that behaved the same, moving the logic for deciding which log to send first into the new helper so that the behavior of prioritizing initial logs is unchanged). In order to allow this to continue to be shared with ChromeFrame, the serialization details are factored into a secondary helper; this isn't necessarily ideal, but it does have the benefit of making unit-testing the components easier. This is primarily to facilitate a second change that will add more cases where log serialization/deserialization happens, but even on its own it should be helpful since it moves a discrete chunk out of the overly-large MetricsService+MetricsServiceBase, increasing testability, readability, and maintainability. BUG=None TEST=Metrics should continue to work. Review URL: http://codereview.chromium.org/7237057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103280 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_thread.cc')
0 files changed, 0 insertions, 0 deletions