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

Unified Diff: third_party/lzma/v4_65/files/CPP/7zip/Common/LimitedStreams.cpp

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 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
Index: third_party/lzma/v4_65/files/CPP/7zip/Common/LimitedStreams.cpp
diff --git a/third_party/lzma/v4_65/files/CPP/7zip/Common/LimitedStreams.cpp b/third_party/lzma/v4_65/files/CPP/7zip/Common/LimitedStreams.cpp
deleted file mode 100644
index 490aa37bc6ed84ddda035022c598bdfbcc8699b3..0000000000000000000000000000000000000000
--- a/third_party/lzma/v4_65/files/CPP/7zip/Common/LimitedStreams.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// LimitedStreams.cpp
-
-#include "StdAfx.h"
-
-#include "LimitedStreams.h"
-#include "../../Common/Defs.h"
-
-STDMETHODIMP CLimitedSequentialInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
-{
- UInt32 realProcessedSize = 0;
- UInt32 sizeToRead = (UInt32)MyMin((_size - _pos), (UInt64)size);
- HRESULT result = S_OK;
- if (sizeToRead > 0)
- {
- result = _stream->Read(data, sizeToRead, &realProcessedSize);
- _pos += realProcessedSize;
- if (realProcessedSize == 0)
- _wasFinished = true;
- }
- if(processedSize != NULL)
- *processedSize = realProcessedSize;
- return result;
-}
-
-STDMETHODIMP CLimitedSequentialOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
-{
- HRESULT result = S_OK;
- if (processedSize != NULL)
- *processedSize = 0;
- if (size > _size)
- {
- size = (UInt32)_size;
- if (size == 0)
- {
- _overflow = true;
- return E_FAIL;
- }
- }
- if (_stream)
- result = _stream->Write(data, size, &size);
- _size -= size;
- if (processedSize != NULL)
- *processedSize = size;
- return result;
-}

Powered by Google App Engine
This is Rietveld 408576698