OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/diagnostics/diagnostics_main.h" | 5 #include "chrome/browser/diagnostics/diagnostics_main.h" |
6 | 6 |
7 #if defined(OS_POSIX) | 7 #if defined(OS_POSIX) |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 #endif | 10 #endif |
11 | 11 |
12 #include <iostream> | 12 #include <iostream> |
13 | 13 |
14 #include "app/app_paths.h" | 14 #include "app/app_paths.h" |
15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/i18n/icu_util.h" | 17 #include "base/i18n/icu_util.h" |
18 #include "base/string_util.h" | 18 #include "base/string_util.h" |
19 #include "base/sys_string_conversions.h" | 19 #include "base/sys_string_conversions.h" |
20 #include "base/time.h" | 20 #include "base/time.h" |
21 #include "base/utf_string_conversions.h" | 21 #include "base/utf_string_conversions.h" |
22 #include "chrome/browser/diagnostics/diagnostics_model.h" | 22 #include "chrome/browser/diagnostics/diagnostics_model.h" |
23 #include "chrome/common/chrome_paths.h" | 23 #include "chrome/common/chrome_paths.h" |
24 | 24 |
25 #if defined(OS_WIN) | |
26 #include "base/win_util.h" | |
27 #endif | |
28 | |
29 namespace { | 25 namespace { |
30 // This is a minimalistic interface to wrap the platform console. This will be | 26 // This is a minimalistic interface to wrap the platform console. This will be |
31 // eventually replaced by a view that can be subclassed for each platform and | 27 // eventually replaced by a view that can be subclassed for each platform and |
32 // that the approved look and feel. | 28 // that the approved look and feel. |
33 class SimpleConsole { | 29 class SimpleConsole { |
34 public: | 30 public: |
35 enum Color { | 31 enum Color { |
36 DEFAULT, | 32 DEFAULT, |
37 RED, | 33 RED, |
38 GREEN, | 34 GREEN, |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 // Windows. | 343 // Windows. |
348 #if defined(OS_WIN) | 344 #if defined(OS_WIN) |
349 // Block here so the user can see the results. | 345 // Block here so the user can see the results. |
350 writer.WriteInfoText(L"Press [enter] to continue\n"); | 346 writer.WriteInfoText(L"Press [enter] to continue\n"); |
351 std::wstring txt; | 347 std::wstring txt; |
352 console->Read(&txt); | 348 console->Read(&txt); |
353 #endif | 349 #endif |
354 delete console; | 350 delete console; |
355 return 0; | 351 return 0; |
356 } | 352 } |
OLD | NEW |