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

Unified Diff: remoting/client/client_util.cc

Issue 2771007: Fix chromoting windows build (Closed)
Patch Set: Created 10 years, 6 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/client/client_util.h ('k') | remoting/host/capturer_gdi.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/client_util.cc
diff --git a/remoting/client/client_util.cc b/remoting/client/client_util.cc
index 66906f8590c4cc4237d7c87a4f8d32d054adb728..a6bf18770ccb081a168c32158035c5f4c2524926 100644
--- a/remoting/client/client_util.cc
+++ b/remoting/client/client_util.cc
@@ -6,37 +6,12 @@
#include <iostream>
-static void SetConsoleEcho(bool on) {
-#ifdef WIN32
- HANDLE hIn = GetStdHandle(STD_INPUT_HANDLE);
- if ((hIn == INVALID_HANDLE_VALUE) || (hIn == NULL))
- return;
-
- DWORD mode;
- if (!GetConsoleMode(hIn, &mode))
- return;
-
- if (on) {
- mode = mode | ENABLE_ECHO_INPUT;
- } else {
- mode = mode & ~ENABLE_ECHO_INPUT;
- }
-
- SetConsoleMode(hIn, mode);
-#else
- if (on)
- system("stty echo");
- else
- system("stty -echo");
-#endif
-}
-
namespace remoting {
// Get host JID from command line arguments, or stdin if not specified.
bool GetLoginInfo(std::string& host_jid,
std::string& username,
- std::string& password) {
+ std::string& auth_token) {
std::cout << "Host JID: ";
std::cin >> host_jid;
std::cin.ignore(); // Consume the leftover '\n'
@@ -64,11 +39,9 @@ bool GetLoginInfo(std::string& host_jid,
return 1;
}
- // Get password (with console echo turned off).
- SetConsoleEcho(false);
- std::cout << "Password: ";
- getline(std::cin, password);
- SetConsoleEcho(true);
+ // Get authenication token (with console echo turned off).
+ std::cout << "Auth token: ";
+ getline(std::cin, auth_token);
std::cout << std::endl;
return true;
}
« no previous file with comments | « remoting/client/client_util.h ('k') | remoting/host/capturer_gdi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698