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

Side by Side Diff: chrome/browser/extensions/api/messaging/native_message_process_host.h

Issue 323683002: net: FileStream cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add DCHECK, fix ASSERT message Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
11 #include "base/files/file.h"
wtc 2014/06/19 18:20:49 Nit: we don't need this header now because there i
rvargas (doing something else) 2014/06/19 18:46:42 It is needed to define PlatformFile for read_file_
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
13 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
14 #include "base/process/process.h" 15 #include "base/process/process.h"
15 #include "chrome/browser/extensions/api/messaging/native_process_launcher.h" 16 #include "chrome/browser/extensions/api/messaging/native_process_launcher.h"
16 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
17 18
18 class PrefService; 19 class PrefService;
19 20
20 namespace net { 21 namespace net {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // Set to true after the native messaging connection has been stopped, e.g. 145 // Set to true after the native messaging connection has been stopped, e.g.
145 // due to an error. 146 // due to an error.
146 bool closed_; 147 bool closed_;
147 148
148 base::ProcessHandle process_handle_; 149 base::ProcessHandle process_handle_;
149 150
150 // Input stream reader. 151 // Input stream reader.
151 scoped_ptr<net::FileStream> read_stream_; 152 scoped_ptr<net::FileStream> read_stream_;
152 153
153 #if defined(OS_POSIX) 154 #if defined(OS_POSIX)
154 // TODO(rvargas): Remove these members, maybe merging the functionality to
155 // net::FileStream.
156 base::PlatformFile read_file_; 155 base::PlatformFile read_file_;
157 base::MessageLoopForIO::FileDescriptorWatcher read_watcher_; 156 base::MessageLoopForIO::FileDescriptorWatcher read_watcher_;
158 #endif // !defined(OS_POSIX) 157 #endif // !defined(OS_POSIX)
159 158
160 // Write stream. 159 // Write stream.
161 scoped_ptr<net::FileStream> write_stream_; 160 scoped_ptr<net::FileStream> write_stream_;
162 161
163 // Read buffer passed to FileStream::Read(). 162 // Read buffer passed to FileStream::Read().
164 scoped_refptr<net::IOBuffer> read_buffer_; 163 scoped_refptr<net::IOBuffer> read_buffer_;
165 164
(...skipping 11 matching lines...) Expand all
177 176
178 // Set to true when a write is pending. 177 // Set to true when a write is pending.
179 bool write_pending_; 178 bool write_pending_;
180 179
181 DISALLOW_COPY_AND_ASSIGN(NativeMessageProcessHost); 180 DISALLOW_COPY_AND_ASSIGN(NativeMessageProcessHost);
182 }; 181 };
183 182
184 } // namespace extensions 183 } // namespace extensions
185 184
186 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H _ 185 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698