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

Unified Diff: file_writer_mock.h

Issue 3471006: AU: Speed up updates by using buffered writes. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: update comment Created 10 years, 3 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
« no previous file with comments | « file_writer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: file_writer_mock.h
diff --git a/file_writer_mock.h b/file_writer_mock.h
new file mode 100644
index 0000000000000000000000000000000000000000..004c3b1d2c54b85bbc2cfac2558c0ced33614668
--- /dev/null
+++ b/file_writer_mock.h
@@ -0,0 +1,22 @@
+// Copyright (c) 2010 The Chromium OS 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_FILE_WRITER_MOCK_H__
+#define CHROMEOS_PLATFORM_UPDATE_ENGINE_FILE_WRITER_MOCK_H__
+
+#include "gmock/gmock.h"
+#include "update_engine/file_writer.h"
+
+namespace chromeos_update_engine {
+
+class FileWriterMock : public FileWriter {
+ public:
+ MOCK_METHOD3(Open, int(const char* path, int flags, mode_t mode));
+ MOCK_METHOD2(Write, ssize_t(const void* bytes, size_t count));
+ MOCK_METHOD0(Close, int());
+};
+
+} // namespace chromeos_update_engine
+
+#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_FILE_WRITER_MOCK_H__
« no previous file with comments | « file_writer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698