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

Unified Diff: chrome/browser/sync/internal_api/sync_manager.cc

Issue 8189003: Send important client side event information to the server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: committing. Created 9 years, 2 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
Index: chrome/browser/sync/internal_api/sync_manager.cc
diff --git a/chrome/browser/sync/internal_api/sync_manager.cc b/chrome/browser/sync/internal_api/sync_manager.cc
index 0bef79a7fe66918269d856bd61b6410a9dc75e1d..c8435b65b996a08fe7dab7efb01fca927e24a726 100644
--- a/chrome/browser/sync/internal_api/sync_manager.cc
+++ b/chrome/browser/sync/internal_api/sync_manager.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/sync/internal_api/base_node.h"
#include "chrome/browser/sync/internal_api/change_reorder_buffer.h"
#include "chrome/browser/sync/internal_api/configure_reason.h"
+#include "chrome/browser/sync/internal_api/debug_info_event_listener.h"
#include "chrome/browser/sync/internal_api/read_node.h"
#include "chrome/browser/sync/internal_api/read_transaction.h"
#include "chrome/browser/sync/internal_api/syncapi_server_connection_manager.h"
@@ -551,6 +552,9 @@ class SyncManager::SyncInternal
JsSyncManagerObserver js_sync_manager_observer_;
JsMutationEventObserver js_mutation_event_observer_;
+ // This is for keeping track of client events to send to the server.
+ DebugInfoEventListener debug_info_event_listener_;
+
MessageLoop* const created_on_loop_;
};
const int SyncManager::SyncInternal::kDefaultNudgeDelayMilliseconds = 200;
@@ -766,6 +770,8 @@ bool SyncManager::SyncInternal::Init(
AddObserver(&js_sync_manager_observer_);
SetJsEventHandler(event_handler);
+ AddObserver(&debug_info_event_listener_);
+
share_.dir_manager.reset(new DirectoryManager(database_location));
connection_manager_.reset(new SyncAPIServerConnectionManager(
@@ -787,7 +793,8 @@ bool SyncManager::SyncInternal::Init(
connection_manager_.get(),
dir_manager(),
model_safe_worker_registrar,
- listeners);
+ listeners,
+ &debug_info_event_listener_);
context->set_account_name(credentials.email);
// The SyncScheduler takes ownership of |context|.
scheduler_.reset(new SyncScheduler(name_, context, new Syncer()));
@@ -1271,6 +1278,8 @@ void SyncManager::SyncInternal::ShutdownOnSyncThread() {
SetJsEventHandler(WeakHandle<JsEventHandler>());
RemoveObserver(&js_sync_manager_observer_);
+ RemoveObserver(&debug_info_event_listener_);
+
if (sync_notifier_.get()) {
sync_notifier_->RemoveObserver(this);
}

Powered by Google App Engine
This is Rietveld 408576698