summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
Diffstat (limited to 'sync')
-rw-r--r--sync/internal_api/debug_info_event_listener.cc65
-rw-r--r--sync/internal_api/debug_info_event_listener.h26
-rw-r--r--sync/internal_api/debug_info_event_listener_unittest.cc7
-rw-r--r--sync/internal_api/js_sync_manager_observer.cc1
-rw-r--r--sync/internal_api/js_sync_manager_observer.h4
-rw-r--r--sync/internal_api/js_sync_manager_observer_unittest.cc5
-rw-r--r--sync/internal_api/public/data_type_association_stats.cc27
-rw-r--r--sync/internal_api/public/data_type_association_stats.h43
-rw-r--r--sync/internal_api/public/data_type_debug_info_listener.h26
-rw-r--r--sync/internal_api/public/sync_manager.h6
-rw-r--r--sync/internal_api/sync_manager_impl.cc5
-rw-r--r--sync/internal_api/sync_manager_impl_unittest.cc8
-rw-r--r--sync/internal_api/test/fake_sync_manager.cc3
-rw-r--r--sync/sync.gyp3
14 files changed, 213 insertions, 16 deletions
diff --git a/sync/internal_api/debug_info_event_listener.cc b/sync/internal_api/debug_info_event_listener.cc
index df46f50..a356f84 100644
--- a/sync/internal_api/debug_info_event_listener.cc
+++ b/sync/internal_api/debug_info_event_listener.cc
@@ -13,7 +13,8 @@ using sessions::SyncSessionSnapshot;
DebugInfoEventListener::DebugInfoEventListener()
: events_dropped_(false),
cryptographer_has_pending_keys_(false),
- cryptographer_ready_(false) {
+ cryptographer_ready_(false),
+ weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
}
DebugInfoEventListener::~DebugInfoEventListener() {
@@ -21,6 +22,7 @@ DebugInfoEventListener::~DebugInfoEventListener() {
void DebugInfoEventListener::OnSyncCycleCompleted(
const SyncSessionSnapshot& snapshot) {
+ DCHECK(thread_checker_.CalledOnValidThread());
sync_pb::DebugEventInfo event_info;
sync_pb::SyncCycleCompletedEventInfo* sync_completed_event_info =
event_info.mutable_sync_cycle_completed_event_info();
@@ -46,27 +48,33 @@ void DebugInfoEventListener::OnSyncCycleCompleted(
void DebugInfoEventListener::OnInitializationComplete(
const WeakHandle<JsBackend>& js_backend,
+ const WeakHandle<DataTypeDebugInfoListener>& debug_listener,
bool success, ModelTypeSet restored_types) {
+ DCHECK(thread_checker_.CalledOnValidThread());
CreateAndAddEvent(sync_pb::DebugEventInfo::INITIALIZATION_COMPLETE);
}
void DebugInfoEventListener::OnConnectionStatusChange(
ConnectionStatus status) {
+ DCHECK(thread_checker_.CalledOnValidThread());
CreateAndAddEvent(sync_pb::DebugEventInfo::CONNECTION_STATUS_CHANGE);
}
void DebugInfoEventListener::OnPassphraseRequired(
PassphraseRequiredReason reason,
const sync_pb::EncryptedData& pending_keys) {
+ DCHECK(thread_checker_.CalledOnValidThread());
CreateAndAddEvent(sync_pb::DebugEventInfo::PASSPHRASE_REQUIRED);
}
void DebugInfoEventListener::OnPassphraseAccepted() {
+ DCHECK(thread_checker_.CalledOnValidThread());
CreateAndAddEvent(sync_pb::DebugEventInfo::PASSPHRASE_ACCEPTED);
}
void DebugInfoEventListener::OnBootstrapTokenUpdated(
const std::string& bootstrap_token, BootstrapTokenType type) {
+ DCHECK(thread_checker_.CalledOnValidThread());
if (type == PASSPHRASE_BOOTSTRAP_TOKEN) {
CreateAndAddEvent(sync_pb::DebugEventInfo::BOOTSTRAP_TOKEN_UPDATED);
return;
@@ -76,25 +84,30 @@ void DebugInfoEventListener::OnBootstrapTokenUpdated(
}
void DebugInfoEventListener::OnStopSyncingPermanently() {
+ DCHECK(thread_checker_.CalledOnValidThread());
CreateAndAddEvent(sync_pb::DebugEventInfo::STOP_SYNCING_PERMANENTLY);
}
void DebugInfoEventListener::OnUpdatedToken(const std::string& token) {
+ DCHECK(thread_checker_.CalledOnValidThread());
CreateAndAddEvent(sync_pb::DebugEventInfo::UPDATED_TOKEN);
}
void DebugInfoEventListener::OnEncryptedTypesChanged(
ModelTypeSet encrypted_types,
bool encrypt_everything) {
+ DCHECK(thread_checker_.CalledOnValidThread());
CreateAndAddEvent(sync_pb::DebugEventInfo::ENCRYPTED_TYPES_CHANGED);
}
void DebugInfoEventListener::OnEncryptionComplete() {
+ DCHECK(thread_checker_.CalledOnValidThread());
CreateAndAddEvent(sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE);
}
void DebugInfoEventListener::OnCryptographerStateChanged(
Cryptographer* cryptographer) {
+ DCHECK(thread_checker_.CalledOnValidThread());
cryptographer_has_pending_keys_ = cryptographer->has_pending_keys();
cryptographer_ready_ = cryptographer->is_ready();
}
@@ -102,15 +115,18 @@ void DebugInfoEventListener::OnCryptographerStateChanged(
void DebugInfoEventListener::OnPassphraseTypeChanged(
PassphraseType type,
base::Time explicit_passphrase_time) {
+ DCHECK(thread_checker_.CalledOnValidThread());
CreateAndAddEvent(sync_pb::DebugEventInfo::PASSPHRASE_TYPE_CHANGED);
}
void DebugInfoEventListener::OnActionableError(
const SyncProtocolError& sync_error) {
+ DCHECK(thread_checker_.CalledOnValidThread());
CreateAndAddEvent(sync_pb::DebugEventInfo::ACTIONABLE_ERROR);
}
void DebugInfoEventListener::OnNudgeFromDatatype(ModelType datatype) {
+ DCHECK(thread_checker_.CalledOnValidThread());
sync_pb::DebugEventInfo event_info;
event_info.set_nudging_datatype(
GetSpecificsFieldNumberFromModelType(datatype));
@@ -119,6 +135,7 @@ void DebugInfoEventListener::OnNudgeFromDatatype(ModelType datatype) {
void DebugInfoEventListener::OnIncomingNotification(
const ModelTypeInvalidationMap& invalidation_map) {
+ DCHECK(thread_checker_.CalledOnValidThread());
sync_pb::DebugEventInfo event_info;
ModelTypeSet types = ModelTypeInvalidationMapToSet(invalidation_map);
@@ -132,6 +149,7 @@ void DebugInfoEventListener::OnIncomingNotification(
void DebugInfoEventListener::GetAndClearDebugInfo(
sync_pb::DebugInfo* debug_info) {
+ DCHECK(thread_checker_.CalledOnValidThread());
DCHECK_LE(events_.size(), kMaxEntries);
while (!events_.empty()) {
sync_pb::DebugEventInfo* event_info = debug_info->add_events();
@@ -148,8 +166,52 @@ void DebugInfoEventListener::GetAndClearDebugInfo(
events_dropped_ = false;
}
+base::WeakPtr<DataTypeDebugInfoListener> DebugInfoEventListener::GetWeakPtr() {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return weak_ptr_factory_.GetWeakPtr();
+}
+
+void DebugInfoEventListener::OnDataTypeAssociationComplete(
+ const DataTypeAssociationStats& association_stats) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ sync_pb::DebugEventInfo association_event;
+ sync_pb::DatatypeAssociationStats* datatype_stats =
+ association_event.mutable_datatype_association_stats();
+ datatype_stats->set_data_type_id(
+ GetSpecificsFieldNumberFromModelType(association_stats.model_type));
+ datatype_stats->set_num_local_items_before_association(
+ association_stats.num_local_items_before_association);
+ datatype_stats->set_num_sync_items_before_association(
+ association_stats.num_sync_items_before_association);
+ datatype_stats->set_num_local_items_after_association(
+ association_stats.num_local_items_after_association);
+ datatype_stats->set_num_sync_items_after_association(
+ association_stats.num_sync_items_after_association);
+ datatype_stats->set_num_local_items_added(
+ association_stats.num_local_items_added);
+ datatype_stats->set_num_local_items_deleted(
+ association_stats.num_local_items_deleted);
+ datatype_stats->set_num_local_items_modified(
+ association_stats.num_local_items_modified);
+ datatype_stats->set_num_sync_items_added(
+ association_stats.num_sync_items_added);
+ datatype_stats->set_num_sync_items_deleted(
+ association_stats.num_sync_items_deleted);
+ datatype_stats->set_num_sync_items_modified(
+ association_stats.num_sync_items_modified);
+ datatype_stats->set_had_error(association_stats.had_error);
+
+ AddEventToQueue(association_event);
+}
+
+void DebugInfoEventListener::OnConfigureComplete() {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ CreateAndAddEvent(sync_pb::DebugEventInfo::CONFIGURE_COMPLETE);
+}
+
void DebugInfoEventListener::CreateAndAddEvent(
sync_pb::DebugEventInfo::SingletonEventType type) {
+ DCHECK(thread_checker_.CalledOnValidThread());
sync_pb::DebugEventInfo event_info;
event_info.set_singleton_event(type);
AddEventToQueue(event_info);
@@ -157,6 +219,7 @@ void DebugInfoEventListener::CreateAndAddEvent(
void DebugInfoEventListener::AddEventToQueue(
const sync_pb::DebugEventInfo& event_info) {
+ DCHECK(thread_checker_.CalledOnValidThread());
if (events_.size() >= kMaxEntries) {
DVLOG(1) << "DebugInfoEventListener::AddEventToQueue Dropping an old event "
<< "because of full queue";
diff --git a/sync/internal_api/debug_info_event_listener.h b/sync/internal_api/debug_info_event_listener.h
index f364a71..3ccdcb0 100644
--- a/sync/internal_api/debug_info_event_listener.h
+++ b/sync/internal_api/debug_info_event_listener.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/compiler_specific.h"
+#include "sync/internal_api/public/data_type_debug_info_listener.h"
#include "sync/internal_api/public/sessions/sync_session_snapshot.h"
#include "sync/internal_api/public/sync_encryption_handler.h"
#include "sync/internal_api/public/sync_manager.h"
@@ -19,13 +20,17 @@
namespace syncer {
-const unsigned int kMaxEntries = 6;
+// In order to track datatype association results, we need at least as many
+// entries as datatypes.
+const unsigned int kMaxEntries = 25;
// Listens to events and records them in a queue. And passes the events to
// syncer when requested.
+// This class is not thread safe and should only be accessed on the sync thread.
class DebugInfoEventListener : public SyncManager::Observer,
public SyncEncryptionHandler::Observer,
- public sessions::DebugInfoGetter {
+ public sessions::DebugInfoGetter,
+ public DataTypeDebugInfoListener {
public:
DebugInfoEventListener();
virtual ~DebugInfoEventListener();
@@ -34,7 +39,8 @@ class DebugInfoEventListener : public SyncManager::Observer,
virtual void OnSyncCycleCompleted(
const sessions::SyncSessionSnapshot& snapshot) OVERRIDE;
virtual void OnInitializationComplete(
- const syncer::WeakHandle<JsBackend>& js_backend,
+ const WeakHandle<JsBackend>& js_backend,
+ const WeakHandle<DataTypeDebugInfoListener>& debug_listener,
bool success, ModelTypeSet restored_types) OVERRIDE;
virtual void OnConnectionStatusChange(
ConnectionStatus connection_status) OVERRIDE;
@@ -66,9 +72,17 @@ class DebugInfoEventListener : public SyncManager::Observer,
void OnIncomingNotification(
const ModelTypeInvalidationMap& invalidation_map);
- // DebugInfoGetter Implementation.
+ // DebugInfoGetter implementation.
virtual void GetAndClearDebugInfo(sync_pb::DebugInfo* debug_info) OVERRIDE;
+ // DataTypeDebugInfoListener implementation.
+ virtual void OnDataTypeAssociationComplete(
+ const DataTypeAssociationStats& association_stats) OVERRIDE;
+ virtual void OnConfigureComplete() OVERRIDE;
+
+ // Returns a weak pointer to this object.
+ base::WeakPtr<DataTypeDebugInfoListener> GetWeakPtr();
+
private:
FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyEventsAdded);
FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyQueueSize);
@@ -88,6 +102,10 @@ class DebugInfoEventListener : public SyncManager::Observer,
// Cryptographer is initialized and does not have pending keys.
bool cryptographer_ready_;
+ base::WeakPtrFactory<DebugInfoEventListener> weak_ptr_factory_;
+
+ base::ThreadChecker thread_checker_;
+
DISALLOW_COPY_AND_ASSIGN(DebugInfoEventListener);
};
diff --git a/sync/internal_api/debug_info_event_listener_unittest.cc b/sync/internal_api/debug_info_event_listener_unittest.cc
index 236d6b0..131728b 100644
--- a/sync/internal_api/debug_info_event_listener_unittest.cc
+++ b/sync/internal_api/debug_info_event_listener_unittest.cc
@@ -24,11 +24,14 @@ TEST_F(DebugInfoEventListenerTest, VerifyEventsAdded) {
TEST_F(DebugInfoEventListenerTest, VerifyQueueSize) {
DebugInfoEventListener debug_info_event_listener;
- for (int i = 0; i < 10; ++i) {
+ for (unsigned int i = 0; i < 2*kMaxEntries; ++i) {
debug_info_event_listener.CreateAndAddEvent(
sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE);
}
- ASSERT_EQ(debug_info_event_listener.events_.size(), kMaxEntries);
+ sync_pb::DebugInfo debug_info;
+ debug_info_event_listener.GetAndClearDebugInfo(&debug_info);
+ ASSERT_TRUE(debug_info.events_dropped());
+ ASSERT_EQ(static_cast<int>(kMaxEntries), debug_info.events_size());
}
TEST_F(DebugInfoEventListenerTest, VerifyGetAndClearEvents) {
diff --git a/sync/internal_api/js_sync_manager_observer.cc b/sync/internal_api/js_sync_manager_observer.cc
index d60d5e0..96c78c9 100644
--- a/sync/internal_api/js_sync_manager_observer.cc
+++ b/sync/internal_api/js_sync_manager_observer.cc
@@ -71,6 +71,7 @@ void JsSyncManagerObserver::OnActionableError(
void JsSyncManagerObserver::OnInitializationComplete(
const WeakHandle<JsBackend>& js_backend,
+ const WeakHandle<DataTypeDebugInfoListener>& debug_info_listener,
bool success, syncer::ModelTypeSet restored_types) {
if (!event_handler_.IsInitialized()) {
return;
diff --git a/sync/internal_api/js_sync_manager_observer.h b/sync/internal_api/js_sync_manager_observer.h
index be58f4a..867c734 100644
--- a/sync/internal_api/js_sync_manager_observer.h
+++ b/sync/internal_api/js_sync_manager_observer.h
@@ -36,7 +36,9 @@ class JsSyncManagerObserver : public SyncManager::Observer {
virtual void OnConnectionStatusChange(ConnectionStatus status) OVERRIDE;
virtual void OnUpdatedToken(const std::string& token) OVERRIDE;
virtual void OnInitializationComplete(
- const WeakHandle<JsBackend>& js_backend, bool success,
+ const WeakHandle<JsBackend>& js_backend,
+ const WeakHandle<DataTypeDebugInfoListener>& debug_info_listener,
+ bool success,
syncer::ModelTypeSet restored_types) OVERRIDE;
virtual void OnStopSyncingPermanently() OVERRIDE;
virtual void OnActionableError(
diff --git a/sync/internal_api/js_sync_manager_observer_unittest.cc b/sync/internal_api/js_sync_manager_observer_unittest.cc
index 31cef5d..c07d909 100644
--- a/sync/internal_api/js_sync_manager_observer_unittest.cc
+++ b/sync/internal_api/js_sync_manager_observer_unittest.cc
@@ -67,7 +67,10 @@ TEST_F(JsSyncManagerObserverTest, OnInitializationComplete) {
HasDetailsAsDictionary(expected_details)));
js_sync_manager_observer_.OnInitializationComplete(
- WeakHandle<JsBackend>(), true, restored_types);
+ WeakHandle<JsBackend>(),
+ WeakHandle<DataTypeDebugInfoListener>(),
+ true,
+ restored_types);
PumpLoop();
}
diff --git a/sync/internal_api/public/data_type_association_stats.cc b/sync/internal_api/public/data_type_association_stats.cc
new file mode 100644
index 0000000..0a77a7c
--- /dev/null
+++ b/sync/internal_api/public/data_type_association_stats.cc
@@ -0,0 +1,27 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "sync/internal_api/public/data_type_association_stats.h"
+
+namespace syncer {
+
+DataTypeAssociationStats::DataTypeAssociationStats()
+ : model_type(UNSPECIFIED),
+ num_local_items_before_association(0),
+ num_sync_items_before_association(0),
+ num_local_items_after_association(0),
+ num_sync_items_after_association(0),
+ num_local_items_added(0),
+ num_local_items_deleted(0),
+ num_local_items_modified(0),
+ num_sync_items_added(0),
+ num_sync_items_deleted(0),
+ num_sync_items_modified(0),
+ had_error(false) {
+}
+
+DataTypeAssociationStats::~DataTypeAssociationStats() {
+}
+
+} // namespace syncer
diff --git a/sync/internal_api/public/data_type_association_stats.h b/sync/internal_api/public/data_type_association_stats.h
new file mode 100644
index 0000000..f83eddd
--- /dev/null
+++ b/sync/internal_api/public/data_type_association_stats.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ASSOCIATION_STATS_H_
+#define SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ASSOCIATION_STATS_H_
+
+#include "sync/internal_api/public/base/model_type.h"
+
+namespace syncer {
+
+// Container for datatype association results.
+struct DataTypeAssociationStats {
+ DataTypeAssociationStats();
+ ~DataTypeAssociationStats();
+
+ // The datatype that was associated.
+ ModelType model_type;
+
+ // The state of the world before association.
+ int num_local_items_before_association;
+ int num_sync_items_before_association;
+
+ // The state of the world after association.
+ int num_local_items_after_association;
+ int num_sync_items_after_association;
+
+ // The changes that took place during association. In a correctly working
+ // system these should be the deltas between before and after.
+ int num_local_items_added;
+ int num_local_items_deleted;
+ int num_local_items_modified;
+ int num_sync_items_added;
+ int num_sync_items_deleted;
+ int num_sync_items_modified;
+
+ // Whether a datatype unrecoverable error was encountered during association.
+ bool had_error;
+};
+
+} // namespace syncer
+
+#endif // SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ASSOCIATION_STATS_H_
diff --git a/sync/internal_api/public/data_type_debug_info_listener.h b/sync/internal_api/public/data_type_debug_info_listener.h
new file mode 100644
index 0000000..81ee889
--- /dev/null
+++ b/sync/internal_api/public/data_type_debug_info_listener.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_DEBUG_INFO_LISTENER_H_
+#define SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_DEBUG_INFO_LISTENER_H_
+
+#include "sync/internal_api/public/base/model_type.h"
+#include "sync/internal_api/public/data_type_association_stats.h"
+
+namespace syncer {
+
+// Interface for the sync internals to listen to external sync events.
+class DataTypeDebugInfoListener {
+ public:
+ // Notify the listener that a datatype's association has completed.
+ virtual void OnDataTypeAssociationComplete(
+ const DataTypeAssociationStats& association_stats) = 0;
+
+ // Notify the listener that configuration has completed and sync has begun.
+ virtual void OnConfigureComplete() = 0;
+};
+
+} // namespace syncer
+
+#endif // SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_DEBUG_INFO_LISTENER_H_
diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h
index 15b91e2..6ed9eab 100644
--- a/sync/internal_api/public/sync_manager.h
+++ b/sync/internal_api/public/sync_manager.h
@@ -32,6 +32,7 @@ class EncryptedData;
namespace syncer {
class BaseTransaction;
+class DataTypeDebugInfoListener;
class Encryptor;
struct Experiments;
class ExtensionsActivityMonitor;
@@ -254,9 +255,10 @@ class SyncManager {
// function getChildNodeIds(id);
virtual void OnInitializationComplete(
- const WeakHandle<syncer::JsBackend>& js_backend,
+ const WeakHandle<JsBackend>& js_backend,
+ const WeakHandle<DataTypeDebugInfoListener>& debug_info_listener,
bool success,
- syncer::ModelTypeSet restored_types) = 0;
+ ModelTypeSet restored_types) = 0;
// We are no longer permitted to communicate with the server. Sync should
// be disabled and state cleaned up at once. This can happen for a number
diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc
index 2eb60c6..37c1a01 100644
--- a/sync/internal_api/sync_manager_impl.cc
+++ b/sync/internal_api/sync_manager_impl.cc
@@ -415,7 +415,9 @@ void SyncManagerImpl::Init(
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
OnInitializationComplete(
MakeWeakHandle(weak_ptr_factory_.GetWeakPtr()),
- false, syncer::ModelTypeSet()));
+ MakeWeakHandle(
+ debug_info_event_listener_.GetWeakPtr()),
+ false, ModelTypeSet()));
LOG(ERROR) << "Sync manager initialization failed!";
return;
}
@@ -473,6 +475,7 @@ void SyncManagerImpl::Init(
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
OnInitializationComplete(
MakeWeakHandle(weak_ptr_factory_.GetWeakPtr()),
+ MakeWeakHandle(debug_info_event_listener_.GetWeakPtr()),
true, InitialSyncEndedTypes()));
}
diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc
index d0b3793..61b4672 100644
--- a/sync/internal_api/sync_manager_impl_unittest.cc
+++ b/sync/internal_api/sync_manager_impl_unittest.cc
@@ -674,8 +674,10 @@ class SyncManagerObserverMock : public SyncManager::Observer {
public:
MOCK_METHOD1(OnSyncCycleCompleted,
void(const SyncSessionSnapshot&)); // NOLINT
- MOCK_METHOD3(OnInitializationComplete,
- void(const WeakHandle<JsBackend>&, bool,
+ MOCK_METHOD4(OnInitializationComplete,
+ void(const WeakHandle<JsBackend>&,
+ const WeakHandle<DataTypeDebugInfoListener>&,
+ bool,
syncer::ModelTypeSet)); // NOLINT
MOCK_METHOD1(OnConnectionStatusChange, void(ConnectionStatus)); // NOLINT
MOCK_METHOD0(OnStopSyncingPermanently, void()); // NOLINT
@@ -739,7 +741,7 @@ class SyncManagerTest : public testing::Test,
fake_invalidator_ = new FakeInvalidator();
sync_manager_.AddObserver(&manager_observer_);
- EXPECT_CALL(manager_observer_, OnInitializationComplete(_, _, _)).
+ EXPECT_CALL(manager_observer_, OnInitializationComplete(_, _, _, _)).
WillOnce(SaveArg<0>(&js_backend_));
EXPECT_FALSE(js_backend_.IsInitialized());
diff --git a/sync/internal_api/test/fake_sync_manager.cc b/sync/internal_api/test/fake_sync_manager.cc
index aeeffb0..f90bbd7 100644
--- a/sync/internal_api/test/fake_sync_manager.cc
+++ b/sync/internal_api/test/fake_sync_manager.cc
@@ -114,7 +114,8 @@ void FakeSyncManager::Init(
PurgePartiallySyncedTypes();
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,
OnInitializationComplete(
- syncer::WeakHandle<syncer::JsBackend>(),
+ WeakHandle<JsBackend>(),
+ WeakHandle<DataTypeDebugInfoListener>(),
true, initial_sync_ended_types_));
}
diff --git a/sync/sync.gyp b/sync/sync.gyp
index c91534d..e74aee4 100644
--- a/sync/sync.gyp
+++ b/sync/sync.gyp
@@ -327,6 +327,9 @@
'internal_api/public/base_transaction.h',
'internal_api/public/change_record.h',
'internal_api/public/configure_reason.h',
+ 'internal_api/public/data_type_association_stats.cc',
+ 'internal_api/public/data_type_association_stats.h',
+ 'internal_api/public/data_type_debug_info_listener.h',
'internal_api/public/http_bridge.h',
'internal_api/public/http_post_provider_factory.h',
'internal_api/public/http_post_provider_interface.h',