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

Side by Side Diff: chrome/browser/operation_output_win.h

Issue 12674028: Report text output and exit code for command-line operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgotten review responses. Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/operation_output.cc ('k') | chrome/browser/operation_output_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // See apps/app_host/operation_launcher.h for information on how operation
6 // output channels are established on Windows.
7
8 #ifndef CHROME_BROWSER_OPERATION_OUTPUT_WIN_H_
9 #define CHROME_BROWSER_OPERATION_OUTPUT_WIN_H_
10
11 #include "chrome/browser/operation_output.h"
12
13 #include <windows.h>
14 #include "base/basictypes.h"
15 #include "base/compiler_specific.h"
16 #include "base/win/scoped_handle.h"
17
18 // Implements an OperationOutput channel on Windows, using one writable HANDLE
19 // each for the output and the exit code.
20 class OperationOutputWin : public OperationOutput {
21 public:
22 // Instantiates an OperationOutputWin. |output_pipe| and |exit_code_pipe| must
23 // be valid in the current process.
24 OperationOutputWin(base::win::ScopedHandle output_pipe,
25 base::win::ScopedHandle exit_code_pipe);
26
27 // OperationOutput implementation.
28 virtual bool Write(const char* data, unsigned int length) OVERRIDE;
29
30 private:
31 // OperationOutput implementation.
32 virtual bool SetExitCode(unsigned int exit_code) OVERRIDE;
33
34 base::win::ScopedHandle output_pipe_;
35 base::win::ScopedHandle exit_code_pipe_;
36
37 DISALLOW_COPY_AND_ASSIGN(OperationOutputWin);
38 };
39
40 #endif // CHROME_BROWSER_OPERATION_OUTPUT_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/operation_output.cc ('k') | chrome/browser/operation_output_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698