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

Unified Diff: sync/test/sessions/mock_debug_info_getter.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/test/engine/mock_connection_manager.cc ('k') | sync/test/sessions/mock_debug_info_getter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/sessions/mock_debug_info_getter.h
diff --git a/sync/test/sessions/mock_debug_info_getter.h b/sync/test/sessions/mock_debug_info_getter.h
new file mode 100644
index 0000000000000000000000000000000000000000..e66a962ff67b67e61027bc1617650a20d7f2e001
--- /dev/null
+++ b/sync/test/sessions/mock_debug_info_getter.h
@@ -0,0 +1,39 @@
+// Copyright 2013 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_SESSIONS_MOCK_DEBUG_INFO_GETTER_H_
+#define SYNC_SESSIONS_MOCK_DEBUG_INFO_GETTER_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "sync/base/sync_export.h"
+#include "sync/protocol/sync.pb.h"
+#include "sync/sessions/debug_info_getter.h"
+
+namespace syncer {
+namespace sessions {
+
+// A mock implementation of DebugInfoGetter to be used in tests. Events added by
+// AddDebugEvent are accessible via DebugInfoGetter methods.
+class MockDebugInfoGetter : public sessions::DebugInfoGetter {
+ public:
+ MockDebugInfoGetter();
+ virtual ~MockDebugInfoGetter();
+
+ // DebugInfoGetter implementation.
+ virtual void GetDebugInfo(sync_pb::DebugInfo* debug_info) OVERRIDE;
+ virtual void ClearDebugInfo() OVERRIDE;
+
+ void AddDebugEvent();
+
+ private:
+ sync_pb::DebugInfo debug_info_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockDebugInfoGetter);
+};
+
+} // namespace sessions
+} // namespace syncer
+
+#endif // SYNC_SESSIONS_MOCK_DEBUG_INFO_GETTER_H_
« no previous file with comments | « sync/test/engine/mock_connection_manager.cc ('k') | sync/test/sessions/mock_debug_info_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698