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

Side by Side Diff: third_party/lzma/v4_65/files/CPP/7zip/UI/Console/OpenCallbackConsole.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 unified diff | Download patch
OLDNEW
(Empty)
1 // OpenCallbackConsole.cpp
2
3 #include "StdAfx.h"
4
5 #include "OpenCallbackConsole.h"
6
7 #include "ConsoleClose.h"
8 #include "UserInputUtils.h"
9
10 HRESULT COpenCallbackConsole::Open_CheckBreak()
11 {
12 if (NConsoleClose::TestBreakSignal())
13 return E_ABORT;
14 return S_OK;
15 }
16
17 HRESULT COpenCallbackConsole::Open_SetTotal(const UInt64 *, const UInt64 *)
18 {
19 return Open_CheckBreak();
20 }
21
22 HRESULT COpenCallbackConsole::Open_SetCompleted(const UInt64 *, const UInt64 *)
23 {
24 return Open_CheckBreak();
25 }
26
27 #ifndef _NO_CRYPTO
28
29 HRESULT COpenCallbackConsole::Open_CryptoGetTextPassword(BSTR *password)
30 {
31 PasswordWasAsked = true;
32 RINOK(Open_CheckBreak());
33 if (!PasswordIsDefined)
34 {
35 Password = GetPassword(OutStream);
36 PasswordIsDefined = true;
37 }
38 return StringToBstr(Password, password);
39 }
40
41 HRESULT COpenCallbackConsole::Open_GetPasswordIfAny(UString &password)
42 {
43 if (PasswordIsDefined)
44 password = Password;
45 return S_OK;
46 }
47
48 bool COpenCallbackConsole::Open_WasPasswordAsked()
49 {
50 return PasswordWasAsked;
51 }
52
53 void COpenCallbackConsole::Open_ClearPasswordWasAskedFlag()
54 {
55 PasswordWasAsked = false;
56 }
57
58 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698