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

Side by Side Diff: chromeos/process_proxy/process_proxy.cc

Issue 16998003: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 #include "chromeos/process_proxy/process_proxy.h" 5 #include "chromeos/process_proxy/process_proxy.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <sys/ioctl.h> 9 #include <sys/ioctl.h>
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // |watch| thread is blocked by |output_watcher| from now on. 98 // |watch| thread is blocked by |output_watcher| from now on.
99 watch_thread->message_loop()->PostTask(FROM_HERE, 99 watch_thread->message_loop()->PostTask(FROM_HERE,
100 base::Bind(&ProcessOutputWatcher::Start, 100 base::Bind(&ProcessOutputWatcher::Start,
101 base::Unretained(output_watcher))); 101 base::Unretained(output_watcher)));
102 watcher_started_ = true; 102 watcher_started_ = true;
103 return true; 103 return true;
104 } 104 }
105 105
106 void ProcessProxy::OnProcessOutput(ProcessOutputType type, 106 void ProcessProxy::OnProcessOutput(ProcessOutputType type,
107 const std::string& output) { 107 const std::string& output) {
108 if (!callback_runner_) 108 if (!callback_runner_.get())
109 return; 109 return;
110 110
111 callback_runner_->PostTask( 111 callback_runner_->PostTask(
112 FROM_HERE, 112 FROM_HERE,
113 base::Bind(&ProcessProxy::CallOnProcessOutputCallback, 113 base::Bind(&ProcessProxy::CallOnProcessOutputCallback,
114 this, type, output)); 114 this, type, output));
115 } 115 }
116 116
117 void ProcessProxy::CallOnProcessOutputCallback(ProcessOutputType type, 117 void ProcessProxy::CallOnProcessOutputCallback(ProcessOutputType type,
118 const std::string& output) { 118 const std::string& output) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 ClearFdPair(pt_pair_); 256 ClearFdPair(pt_pair_);
257 ClearFdPair(shutdown_pipe_); 257 ClearFdPair(shutdown_pipe_);
258 } 258 }
259 259
260 void ProcessProxy::ClearFdPair(int* pipe) { 260 void ProcessProxy::ClearFdPair(int* pipe) {
261 pipe[PIPE_END_READ] = kInvalidFd; 261 pipe[PIPE_END_READ] = kInvalidFd;
262 pipe[PIPE_END_WRITE] = kInvalidFd; 262 pipe[PIPE_END_WRITE] = kInvalidFd;
263 } 263 }
264 264
265 } // namespace chromeos 265 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/network/onc/onc_certificate_importer_unittest.cc ('k') | content/browser/browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698