summaryrefslogtreecommitdiffstats
path: root/chrome/browser/diagnostics
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-18 03:42:30 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-18 03:42:30 +0000
commit5ed60cdb3f706f8e033d67d5f4e3b4663fa7630d (patch)
treebe9d35918e481ef6869e7503416c1e48b2ed4ec8 /chrome/browser/diagnostics
parentb344b8f234e89505e9c7b12c878964e91bed2497 (diff)
downloadchromium_src-5ed60cdb3f706f8e033d67d5f4e3b4663fa7630d.zip
chromium_src-5ed60cdb3f706f8e033d67d5f4e3b4663fa7630d.tar.gz
chromium_src-5ed60cdb3f706f8e033d67d5f4e3b4663fa7630d.tar.bz2
diagnostics: Implement PosixConsole::Read function.
BUG=42894 TEST=enable the "Press [enter] to continue" on Posix, run out/Debug/chrome --diagnostics and see if it can read the line. Review URL: http://codereview.chromium.org/2820009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50208 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/diagnostics')
-rw-r--r--chrome/browser/diagnostics/diagnostics_main.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/browser/diagnostics/diagnostics_main.cc b/chrome/browser/diagnostics/diagnostics_main.cc
index d72e8a5..89a2533 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) {