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

Unified Diff: chrome/browser/metrics/metrics_service.h

Issue 291153013: Make MetricsService upload logs through an interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Casts for win64 compile Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/metrics/compression_utils_unittest.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_service.h
===================================================================
--- chrome/browser/metrics/metrics_service.h (revision 274045)
+++ chrome/browser/metrics/metrics_service.h (working copy)
@@ -32,7 +32,6 @@
#include "components/metrics/metrics_provider.h"
#include "components/metrics/metrics_service_observer.h"
#include "components/variations/active_field_trials.h"
-#include "net/url_request/url_fetcher_delegate.h"
class GoogleUpdateMetricsProviderWin;
class MetricsReportingScheduler;
@@ -55,6 +54,7 @@
}
namespace metrics {
+class MetricsLogUploader;
class MetricsServiceClient;
class MetricsStateManager;
}
@@ -89,8 +89,7 @@
class MetricsService
: public base::HistogramFlattener,
- public chrome_browser_metrics::TrackingSynchronizerObserver,
- public net::URLFetcherDelegate {
+ public chrome_browser_metrics::TrackingSynchronizerObserver {
public:
// The execution phase of the browser.
enum ExecutionPhase {
@@ -357,15 +356,9 @@
// Uploads the currently staged log (which must be non-null).
void SendStagedLog();
- // Prepared the staged log to be passed to the server. Upon return,
- // current_fetch_ should be reset with its upload data set to a compressed
- // copy of the staged log.
- void PrepareFetchWithStagedLog();
+ // Called after transmission completes (either successfully or with failure).
+ void OnLogUploadComplete(int response_code);
- // Implementation of net::URLFetcherDelegate. Called after transmission
- // completes (either successfully or with failure).
- virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
-
// Reads, increments and then sets the specified integer preference.
void IncrementPrefValue(const char* path);
@@ -453,9 +446,12 @@
// initial stability log may be sent before this.
scoped_ptr<MetricsLog> initial_metrics_log_;
- // The outstanding transmission appears as a URL Fetch operation.
- scoped_ptr<net::URLFetcher> current_fetch_;
+ // Instance of the helper class for uploading logs.
+ scoped_ptr<metrics::MetricsLogUploader> log_uploader_;
+ // Whether there is a current log upload in progress.
+ bool log_upload_in_progress_;
+
// Whether the MetricsService object has received any notifications since
// the last time a transmission was sent.
bool idle_since_last_transmission_;
@@ -474,10 +470,6 @@
// The scheduler for determining when uploads should happen.
scoped_ptr<MetricsReportingScheduler> scheduler_;
- // Indicates that an asynchronous reporting step is running.
- // This is used only for debugging.
- bool waiting_for_asynchronous_reporting_step_;
-
// Stores the time of the first call to |GetUptimes()|.
base::TimeTicks first_updated_time_;
« no previous file with comments | « chrome/browser/metrics/compression_utils_unittest.cc ('k') | chrome/browser/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698