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

Unified Diff: components/metrics/metrics_service.h

Issue 502173002: Move more metrics classes to metrics namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test compile. Created 6 years, 4 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 | « components/metrics/metrics_reporting_scheduler_unittest.cc ('k') | components/metrics/metrics_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_service.h
diff --git a/components/metrics/metrics_service.h b/components/metrics/metrics_service.h
index 7a9e08db84d73869ca00b4ec856d541f61be12fa..3952fb3228662980d813c8baab956b80e56fbeba 100644
--- a/components/metrics/metrics_service.h
+++ b/components/metrics/metrics_service.h
@@ -31,7 +31,7 @@
#include "components/metrics/metrics_service_observer.h"
#include "components/variations/active_field_trials.h"
-class MetricsReportingScheduler;
+class MetricsServiceAccessor;
class PrefService;
class PrefRegistrySimple;
@@ -46,15 +46,16 @@ namespace variations {
struct ActiveGroupId;
}
+namespace net {
+class URLFetcher;
+}
+
namespace metrics {
+
class MetricsLogUploader;
+class MetricsReportingScheduler;
class MetricsServiceClient;
class MetricsStateManager;
-}
-
-namespace net {
-class URLFetcher;
-}
// A Field Trial and its selected group, which represent a particular
// Chrome configuration state. For example, the trial name could map to
@@ -68,7 +69,7 @@ struct SyntheticTrialGroup {
private:
// Synthetic field trial users:
- friend class MetricsServiceAccessor;
+ friend class ::MetricsServiceAccessor;
friend class MetricsService;
FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial);
@@ -97,8 +98,8 @@ class MetricsService : public base::HistogramFlattener {
// |local_state|. Does not take ownership of the paramaters; instead stores
// a weak pointer to each. Caller should ensure that the parameters are valid
// for the lifetime of this class.
- MetricsService(metrics::MetricsStateManager* state_manager,
- metrics::MetricsServiceClient* client,
+ MetricsService(MetricsStateManager* state_manager,
+ MetricsServiceClient* client,
PrefService* local_state);
virtual ~MetricsService();
@@ -215,7 +216,7 @@ class MetricsService : public base::HistogramFlattener {
// Register the specified |provider| to provide additional metrics into the
// UMA log. Should be called during MetricsService initialization only.
- void RegisterMetricsProvider(scoped_ptr<metrics::MetricsProvider> provider);
+ void RegisterMetricsProvider(scoped_ptr<MetricsProvider> provider);
// Check if this install was cloned or imaged from another machine. If a
// clone is detected, reset the client id and low entropy source. This
@@ -225,7 +226,7 @@ class MetricsService : public base::HistogramFlattener {
protected:
// Exposed for testing.
- metrics::MetricsLogManager* log_manager() { return &log_manager_; }
+ MetricsLogManager* log_manager() { return &log_manager_; }
private:
// The MetricsService has a lifecycle that is stored as a state.
@@ -373,21 +374,21 @@ class MetricsService : public base::HistogramFlattener {
void RecordCurrentStabilityHistograms();
// Manager for the various in-flight logs.
- metrics::MetricsLogManager log_manager_;
+ MetricsLogManager log_manager_;
// |histogram_snapshot_manager_| prepares histogram deltas for transmission.
base::HistogramSnapshotManager histogram_snapshot_manager_;
// Used to manage various metrics reporting state prefs, such as client id,
// low entropy source and whether metrics reporting is enabled. Weak pointer.
- metrics::MetricsStateManager* const state_manager_;
+ MetricsStateManager* const state_manager_;
// Used to interact with the embedder. Weak pointer; must outlive |this|
// instance.
- metrics::MetricsServiceClient* const client_;
+ MetricsServiceClient* const client_;
// Registered metrics providers.
- ScopedVector<metrics::MetricsProvider> metrics_providers_;
+ ScopedVector<MetricsProvider> metrics_providers_;
PrefService* local_state_;
@@ -416,7 +417,7 @@ class MetricsService : public base::HistogramFlattener {
scoped_ptr<MetricsLog> initial_metrics_log_;
// Instance of the helper class for uploading logs.
- scoped_ptr<metrics::MetricsLogUploader> log_uploader_;
+ scoped_ptr<MetricsLogUploader> log_uploader_;
// Whether there is a current log upload in progress.
bool log_upload_in_progress_;
@@ -460,7 +461,7 @@ class MetricsService : public base::HistogramFlattener {
// Confirms single-threaded access to |observers_| in debug builds.
base::ThreadChecker thread_checker_;
- friend class MetricsServiceAccessor;
+ friend class ::MetricsServiceAccessor;
FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, IsPluginProcess);
FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, MetricsServiceObserver);
@@ -471,4 +472,6 @@ class MetricsService : public base::HistogramFlattener {
DISALLOW_COPY_AND_ASSIGN(MetricsService);
};
+} // namespace metrics
+
#endif // COMPONENTS_METRICS_METRICS_SERVICE_H_
« no previous file with comments | « components/metrics/metrics_reporting_scheduler_unittest.cc ('k') | components/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698