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

Unified Diff: chrome/browser/diagnostics/diagnostics_main.cc

Issue 2820009: diagnostics: Implement PosixConsole::Read function. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: remove unnecessary code 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/diagnostics/diagnostics_main.cc
diff --git a/chrome/browser/diagnostics/diagnostics_main.cc b/chrome/browser/diagnostics/diagnostics_main.cc
index d72e8a593548c44b6e1dcc7e886ec4a66e1da17d..89a25332721d02b2317d410a9b79a60c7c74348b 100644
--- a/chrome/browser/diagnostics/diagnostics_main.cc
+++ b/chrome/browser/diagnostics/diagnostics_main.cc
@@ -9,6 +9,8 @@
#include <unistd.h>
#endif
+#include <iostream>
+
#include "app/app_paths.h"
#include "base/basictypes.h"
#include "base/command_line.h"
@@ -152,8 +154,13 @@ class PosixConsole : public SimpleConsole {
}
virtual bool Read(std::wstring* txt) {
- // TODO(mattm): implement this.
- return false;
+ std::string input;
+ if (!std::getline(std::cin, input)) {
+ std::cin.clear();
+ return false;
+ }
+ *txt = UTF8ToWide(input);
+ return true;
}
virtual bool SetColor(Color color) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698