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

Unified Diff: content/browser/tracing/tracing_controller_impl.h

Issue 1526883005: [Tracing Clock Sync] Implement clock sync in Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fix Created 5 years 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
Index: content/browser/tracing/tracing_controller_impl.h
diff --git a/content/browser/tracing/tracing_controller_impl.h b/content/browser/tracing/tracing_controller_impl.h
index 5d1479a90294827bc3f37ee8df8ed5e294b1af61..92ff739ad884b47080f1940fe268324ec01e38bc 100644
--- a/content/browser/tracing/tracing_controller_impl.h
+++ b/content/browser/tracing/tracing_controller_impl.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/lazy_instance.h"
+#include "base/time/time.h"
#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/tracing_agent.h"
#include "content/public/browser/tracing_controller.h"
@@ -164,6 +165,7 @@ class TracingControllerImpl
void OnStartAgentTracingDone(
const base::trace_event::TraceConfig& trace_config,
const StartTracingDoneCallback& callback);
+ void StopTracingAfterClockSync();
void OnStopTracingDone();
void OnStartMonitoringDone(
const base::trace_event::TraceConfig& trace_config,
@@ -172,8 +174,13 @@ class TracingControllerImpl
void OnMonitoringStateChanged(bool is_monitoring);
+ int GetUniqueClockSyncID();
// Issue clock sync markers to the tracing agents.
void IssueClockSyncMarker();
+ void OnClockSyncMarkerRecordedByAgent(
+ int sync_id,
+ const base::TimeTicks& issue_ts,
+ const base::TimeTicks& issue_end_ts);
typedef std::set<scoped_refptr<TraceMessageFilter>> TraceMessageFilterSet;
TraceMessageFilterSet trace_message_filters_;
@@ -201,6 +208,9 @@ class TracingControllerImpl
StartTracingDoneCallback start_tracing_done_callback_;
std::vector<base::trace_event::TracingAgent*> additional_tracing_agents_;
+ int clock_sync_id_;
+ int pending_clock_sync_ack_count_;
+ base::OneShotTimer clock_sync_timer_;
bool is_tracing_;
bool is_monitoring_;

Powered by Google App Engine
This is Rietveld 408576698