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

Unified Diff: remoting/base/decompressor_verbatim.cc

Issue 3305001: Move decoder into separate thread, clean up API layering, and redo update protocl (Closed)
Patch Set: Fix compile error. Created 10 years, 2 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 | « remoting/base/decompressor_verbatim.h ('k') | remoting/base/decompressor_zlib.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/decompressor_verbatim.cc
diff --git a/remoting/base/decompressor_verbatim.cc b/remoting/base/decompressor_verbatim.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d0d2271f202c4b280aa4b57b320d0a8c4c09fe6f
--- /dev/null
+++ b/remoting/base/decompressor_verbatim.cc
@@ -0,0 +1,31 @@
+// Copyright (c) 2010 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 "remoting/base/decompressor_verbatim.h"
+
+#include "base/logging.h"
+
+namespace remoting {
+
+DecompressorVerbatim::DecompressorVerbatim() {
+}
+
+DecompressorVerbatim::~DecompressorVerbatim() {
+}
+
+void DecompressorVerbatim::Reset() {
+}
+
+bool DecompressorVerbatim::Process(const uint8* input_data, int input_size,
+ uint8* output_data, int output_size,
+ int* consumed, int* written) {
+ DCHECK_GT(output_size, 0);
+ int bytes_to_copy = std::min(input_size, output_size);
+ memcpy(output_data, input_data, bytes_to_copy);
+
+ // Since we're just a memcpy, consumed and written are the same.
+ *consumed = *written = bytes_to_copy;
+ return true;
+}
+} // namespace remoting
« no previous file with comments | « remoting/base/decompressor_verbatim.h ('k') | remoting/base/decompressor_zlib.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698