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

Side by Side Diff: chrome/common/ipc_channel_posix.cc

Issue 18248: CommandLine API rework (Closed)
Patch Set: fixes Created 11 years, 11 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
« no previous file with comments | « chrome/common/debug_flags.cc ('k') | chrome/common/ipc_logging.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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/common/ipc_channel_posix.h" 5 #include "chrome/common/ipc_channel_posix.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 } // namespace 159 } // namespace
160 //------------------------------------------------------------------------------ 160 //------------------------------------------------------------------------------
161 161
162 Channel::ChannelImpl::ChannelImpl(const std::wstring& channel_id, Mode mode, 162 Channel::ChannelImpl::ChannelImpl(const std::wstring& channel_id, Mode mode,
163 Listener* listener) 163 Listener* listener)
164 : mode_(mode), 164 : mode_(mode),
165 is_blocked_on_write_(false), 165 is_blocked_on_write_(false),
166 message_send_bytes_written_(0), 166 message_send_bytes_written_(0),
167 uses_fifo_(CommandLine().HasSwitch(switches::kTestingChannelID)), 167 uses_fifo_(CommandLine::ForCurrentProcess()->HasSwitch(
168 switches::kTestingChannelID)),
168 server_listen_pipe_(-1), 169 server_listen_pipe_(-1),
169 pipe_(-1), 170 pipe_(-1),
170 client_pipe_(-1), 171 client_pipe_(-1),
171 listener_(listener), 172 listener_(listener),
172 waiting_connect_(true), 173 waiting_connect_(true),
173 processing_incoming_(false), 174 processing_incoming_(false),
174 factory_(this) { 175 factory_(this) {
175 if (!CreatePipe(channel_id, mode)) { 176 if (!CreatePipe(channel_id, mode)) {
176 // The pipe may have been closed already. 177 // The pipe may have been closed already.
177 LOG(WARNING) << "Unable to create pipe named \"" << channel_id << 178 LOG(WARNING) << "Unable to create pipe named \"" << channel_id <<
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 void Channel::GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) { 561 void Channel::GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) {
561 return channel_impl_->GetClientFileDescriptorMapping(src_fd, dest_fd); 562 return channel_impl_->GetClientFileDescriptorMapping(src_fd, dest_fd);
562 } 563 }
563 564
564 void Channel::OnClientConnected() { 565 void Channel::OnClientConnected() {
565 return channel_impl_->OnClientConnected(); 566 return channel_impl_->OnClientConnected();
566 } 567 }
567 568
568 569
569 } // namespace IPC 570 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/common/debug_flags.cc ('k') | chrome/common/ipc_logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698