other-licenses/7zstub/src/7zip/Archive/Common/CrossThreadProgress.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 // CrossThreadProgress.h
     3 #ifndef __CROSSTHREADPROGRESS_H
     4 #define __CROSSTHREADPROGRESS_H
     6 #include "../../ICoder.h"
     7 #include "../../../Windows/Synchronization.h"
     8 #include "../../../Common/MyCom.h"
    10 class CCrossThreadProgress: 
    11   public ICompressProgressInfo,
    12   public CMyUnknownImp
    13 {
    14 public:
    15   const UInt64 *InSize;
    16   const UInt64 *OutSize;
    17   HRESULT Result;
    18   NWindows::NSynchronization::CAutoResetEvent ProgressEvent;
    19   NWindows::NSynchronization::CAutoResetEvent WaitEvent;
    20   void Init()
    21   {
    22     ProgressEvent.Reset();
    23     WaitEvent.Reset();
    24   }
    26   MY_UNKNOWN_IMP
    28   STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
    29 };
    31 #endif

mercurial