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

Unified Diff: chrome/browser/sync/internal_api/debug_info_event_listener.h

Issue 10147003: [Sync] Move 'syncapi_core' and 'sync_unit_tests' targets to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Win update errors Created 8 years, 8 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/debug_info_event_listener.h
diff --git a/chrome/browser/sync/internal_api/debug_info_event_listener.h b/chrome/browser/sync/internal_api/debug_info_event_listener.h
deleted file mode 100644
index 5bdc9e10a365a12b9fac04a246b27f44290635cb..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/internal_api/debug_info_event_listener.h
+++ /dev/null
@@ -1,91 +0,0 @@
-// 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 CHROME_BROWSER_SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_
-#define CHROME_BROWSER_SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_
-
-#include <queue>
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "chrome/browser/sync/internal_api/sync_manager.h"
-#include "sync/js/js_backend.h"
-#include "sync/protocol/sync.pb.h"
-#include "sync/sessions/debug_info_getter.h"
-#include "sync/sessions/session_state.h"
-#include "sync/util/weak_handle.h"
-
-namespace sync_api {
-
-const unsigned int kMaxEntries = 6;
-
-// Listens to events and records them in a queue. And passes the events to
-// syncer when requested.
-class DebugInfoEventListener : public sync_api::SyncManager::Observer,
- public browser_sync::sessions::DebugInfoGetter {
- public:
- DebugInfoEventListener();
- virtual ~DebugInfoEventListener();
-
- // SyncManager::Observer implementation.
- virtual void OnSyncCycleCompleted(
- const browser_sync::sessions::SyncSessionSnapshot* snapshot) OVERRIDE;
- virtual void OnInitializationComplete(
- const browser_sync::WeakHandle<browser_sync::JsBackend>& js_backend,
- bool success) OVERRIDE;
- virtual void OnConnectionStatusChange(
- sync_api::ConnectionStatus connection_status) OVERRIDE;
- virtual void OnPassphraseRequired(
- sync_api::PassphraseRequiredReason reason,
- const sync_pb::EncryptedData& pending_keys) OVERRIDE;
- virtual void OnPassphraseAccepted() OVERRIDE;
- virtual void OnBootstrapTokenUpdated(
- const std::string& bootstrap_token) OVERRIDE;
- virtual void OnStopSyncingPermanently() OVERRIDE;
- virtual void OnUpdatedToken(const std::string& token) OVERRIDE;
- virtual void OnClearServerDataFailed() OVERRIDE;
- virtual void OnClearServerDataSucceeded() OVERRIDE;
- virtual void OnEncryptedTypesChanged(
- syncable::ModelTypeSet encrypted_types,
- bool encrypt_everything) OVERRIDE;
- virtual void OnEncryptionComplete() OVERRIDE;
- virtual void OnActionableError(
- const browser_sync::SyncProtocolError& sync_error) OVERRIDE;
-
- // Sync manager events.
- void OnNudgeFromDatatype(syncable::ModelType datatype);
- void OnIncomingNotification(
- const syncable::ModelTypePayloadMap& type_payloads);
-
- // DebugInfoGetter Implementation.
- virtual void GetAndClearDebugInfo(sync_pb::DebugInfo* debug_info) OVERRIDE;
-
- // Functions to set cryptographer state.
- void SetCrytographerHasPendingKeys(bool pending_keys);
- void SetCryptographerReady(bool ready);
-
- private:
- FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyEventsAdded);
- FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyQueueSize);
- FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyGetAndClearEvents);
-
- void AddEventToQueue(const sync_pb::DebugEventInfo& event_info);
- void CreateAndAddEvent(sync_pb::DebugEventInfo::EventType type);
- std::queue<sync_pb::DebugEventInfo> events_;
-
- // True indicates we had to drop one or more events to keep our limit of
- // |kMaxEntries|.
- bool events_dropped_;
-
- // Cryptographer has keys that are not yet decrypted.
- bool cryptographer_has_pending_keys_;
-
- // Cryptographer is initialized and does not have pending keys.
- bool cryptographer_ready_;
-
- DISALLOW_COPY_AND_ASSIGN(DebugInfoEventListener);
-};
-
-} // namespace sync_api
-#endif // CHROME_BROWSER_SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_
« no previous file with comments | « chrome/browser/sync/internal_api/configure_reason.h ('k') | chrome/browser/sync/internal_api/debug_info_event_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698