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

Side by Side Diff: content/browser/browser_child_process_host.cc

Issue 9215005: Revert 117824 - Convert use of int ms to TimeDelta in files owned by brettw. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/translate_helper.cc ('k') | content/browser/browser_thread_impl.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/browser_child_process_host.h" 5 #include "content/browser/browser_child_process_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 200 }
201 disconnect_was_alive_ = true; 201 disconnect_was_alive_ = true;
202 #if defined(OS_WIN) 202 #if defined(OS_WIN)
203 child_watcher_.StartWatching( 203 child_watcher_.StartWatching(
204 new base::WaitableEvent(data().handle), this); 204 new base::WaitableEvent(data().handle), this);
205 #else 205 #else
206 // On non-Windows platforms, give the child process some time to die after 206 // On non-Windows platforms, give the child process some time to die after
207 // disconnecting the channel so that the exit code and termination status 207 // disconnecting the channel so that the exit code and termination status
208 // become available. This is best effort -- if the process doesn't die 208 // become available. This is best effort -- if the process doesn't die
209 // within the time limit, this object gets destroyed. 209 // within the time limit, this object gets destroyed.
210 const base::TimeDelta kExitCodeWait = 210 const int kExitCodeWaitMs = 250;
211 base::TimeDelta::FromMilliseconds(250);
212 MessageLoop::current()->PostDelayedTask( 211 MessageLoop::current()->PostDelayedTask(
213 FROM_HERE, 212 FROM_HERE,
214 base::Bind(&BrowserChildProcessHost::OnChildDisconnected, 213 base::Bind(&BrowserChildProcessHost::OnChildDisconnected,
215 task_factory_.GetWeakPtr()), 214 task_factory_.GetWeakPtr()),
216 kExitCodeWait); 215 kExitCodeWaitMs);
217 #endif 216 #endif
218 return; 217 return;
219 } 218 }
220 219
221 default: 220 default:
222 break; 221 break;
223 } 222 }
224 UMA_HISTOGRAM_ENUMERATION("ChildProcess.Disconnected", 223 UMA_HISTOGRAM_ENUMERATION("ChildProcess.Disconnected",
225 data().type, 224 data().type,
226 content::PROCESS_TYPE_MAX); 225 content::PROCESS_TYPE_MAX);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 296
298 return *iterator_; 297 return *iterator_;
299 } while (true); 298 } while (true);
300 299
301 return NULL; 300 return NULL;
302 } 301 }
303 302
304 bool BrowserChildProcessHost::Iterator::Done() { 303 bool BrowserChildProcessHost::Iterator::Done() {
305 return iterator_ == g_child_process_list.Get().end(); 304 return iterator_ == g_child_process_list.Get().end();
306 } 305 }
OLDNEW
« no previous file with comments | « chrome/renderer/translate_helper.cc ('k') | content/browser/browser_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698