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

Unified Diff: sync/internal_api/debug_info_event_listener.h

Issue 61213009: Don't drop debug_info when posting to sync server fails (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed erroneous use of SYNC_EXPORT_PRIVATE from MockDebugInfoGetter. Created 7 years, 1 month 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 | « sync/engine/syncer_unittest.cc ('k') | sync/internal_api/debug_info_event_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/debug_info_event_listener.h
diff --git a/sync/internal_api/debug_info_event_listener.h b/sync/internal_api/debug_info_event_listener.h
index ee12c545a651810208f3464b72cede8fa018f01f..15cc0a669729ca8368f050916e39e524c75ac614 100644
--- a/sync/internal_api/debug_info_event_listener.h
+++ b/sync/internal_api/debug_info_event_listener.h
@@ -5,7 +5,7 @@
#ifndef SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_
#define SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_
-#include <queue>
+#include <deque>
#include <string>
#include "base/compiler_specific.h"
@@ -75,7 +75,10 @@ class SYNC_EXPORT_PRIVATE DebugInfoEventListener
void OnIncomingNotification(const ObjectIdInvalidationMap& invalidations);
// DebugInfoGetter implementation.
- virtual void GetAndClearDebugInfo(sync_pb::DebugInfo* debug_info) OVERRIDE;
+ virtual void GetDebugInfo(sync_pb::DebugInfo* debug_info) OVERRIDE;
+
+ // DebugInfoGetter implementation.
+ virtual void ClearDebugInfo() OVERRIDE;
// DataTypeDebugInfoListener implementation.
virtual void OnDataTypeConfigureComplete(
@@ -88,11 +91,14 @@ class SYNC_EXPORT_PRIVATE DebugInfoEventListener
private:
FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyEventsAdded);
FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyQueueSize);
- FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyGetAndClearEvents);
+ FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyGetEvents);
+ FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyClearEvents);
void AddEventToQueue(const sync_pb::DebugEventInfo& event_info);
void CreateAndAddEvent(sync_pb::DebugEventInfo::SingletonEventType type);
- std::queue<sync_pb::DebugEventInfo> events_;
+
+ typedef std::deque<sync_pb::DebugEventInfo> DebugEventInfoQueue;
+ DebugEventInfoQueue events_;
// True indicates we had to drop one or more events to keep our limit of
// |kMaxEntries|.
« no previous file with comments | « sync/engine/syncer_unittest.cc ('k') | sync/internal_api/debug_info_event_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698