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

Unified Diff: components/metrics/metrics_log_manager.h

Issue 318993002: Merge MetricsLog and MetricsLogBase. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: address nits Created 6 years, 6 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_log_base_unittest.cc ('k') | components/metrics/metrics_log_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_log_manager.h
===================================================================
--- components/metrics/metrics_log_manager.h (revision 275424)
+++ components/metrics/metrics_log_manager.h (working copy)
@@ -10,7 +10,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
-#include "components/metrics/metrics_log_base.h"
+#include "components/metrics/metrics_log.h"
#include "components/metrics/persisted_logs.h"
namespace metrics {
@@ -20,8 +20,6 @@
// text, as well as saving logs to, and loading logs from, persistent storage.
class MetricsLogManager {
public:
- typedef MetricsLogBase::LogType LogType;
-
// The metrics log manager will persist it's unsent logs by storing them in
// |local_state|, and will not persist ongoing logs over
// |max_ongoing_log_size|.
@@ -30,10 +28,10 @@
// Makes |log| the current_log. This should only be called if there is not a
// current log.
- void BeginLoggingWithLog(scoped_ptr<MetricsLogBase> log);
+ void BeginLoggingWithLog(scoped_ptr<MetricsLog> log);
// Returns the in-progress log.
- MetricsLogBase* current_log() { return current_log_.get(); }
+ MetricsLog* current_log() { return current_log_.get(); }
// Closes current_log(), compresses it, and stores the compressed log for
// later, leaving current_log() NULL.
@@ -110,16 +108,16 @@
// Saves |log| as the given type.
// NOTE: This clears the contents of |log| (to avoid an expensive copy),
// so the log should be discarded after this call.
- void StoreLog(std::string* log, LogType log_type);
+ void StoreLog(std::string* log, MetricsLog::LogType log_type);
// Tracks whether unsent logs (if any) have been loaded from the serializer.
bool unsent_logs_loaded_;
// The log that we are still appending to.
- scoped_ptr<MetricsLogBase> current_log_;
+ scoped_ptr<MetricsLog> current_log_;
// A paused, previously-current log.
- scoped_ptr<MetricsLogBase> paused_log_;
+ scoped_ptr<MetricsLog> paused_log_;
// Logs that have not yet been sent.
metrics::PersistedLogs initial_log_queue_;
« no previous file with comments | « components/metrics/metrics_log_base_unittest.cc ('k') | components/metrics/metrics_log_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698