diff options
author | tedvessenes@gmail.com <tedvessenes@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-28 02:16:20 +0000 |
---|---|---|
committer | tedvessenes@gmail.com <tedvessenes@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-28 02:16:20 +0000 |
commit | 6189cd94d214d936e14587b250095aa1a7f7ab6a (patch) | |
tree | 5277266a538cb84c2c8f8f3e6e70ebb64a2f7db0 /content | |
parent | 2f2186cf42eac670305acf001a41d5780440b932 (diff) | |
download | chromium_src-6189cd94d214d936e14587b250095aa1a7f7ab6a.zip chromium_src-6189cd94d214d936e14587b250095aa1a7f7ab6a.tar.gz chromium_src-6189cd94d214d936e14587b250095aa1a7f7ab6a.tar.bz2 |
Convert use of int ms to TimeDelta in content/plugin.
BUG=108171
TEST=
Review URL: http://codereview.chromium.org/9223020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/plugin/plugin_channel.cc | 8 | ||||
-rw-r--r-- | content/plugin/plugin_thread.cc | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/content/plugin/plugin_channel.cc b/content/plugin/plugin_channel.cc index a410af7..56bdf47 100644 --- a/content/plugin/plugin_channel.cc +++ b/content/plugin/plugin_channel.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -31,7 +31,7 @@ void PluginReleaseCallback() { } // How long we wait before releasing the plugin process. -const int kPluginReleaseTimeMs = 5 * 60 * 1000; // 5 minutes +const int kPluginReleaseTimeMinutes = 5; } // namespace @@ -177,7 +177,9 @@ PluginChannel::~PluginChannel() { base::CloseProcessHandle(renderer_handle_); MessageLoop::current()->PostDelayedTask( - FROM_HERE, base::Bind(&PluginReleaseCallback), kPluginReleaseTimeMs); + FROM_HERE, + base::Bind(&PluginReleaseCallback), + base::TimeDelta::FromMinutes(kPluginReleaseTimeMinutes)); } bool PluginChannel::Send(IPC::Message* msg) { diff --git a/content/plugin/plugin_thread.cc b/content/plugin/plugin_thread.cc index 60bb5ad..77dc9d1 100644 --- a/content/plugin/plugin_thread.cc +++ b/content/plugin/plugin_thread.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -49,14 +49,15 @@ class EnsureTerminateMessageFilter : public IPC::ChannelProxy::MessageFilter { private: virtual void OnChannelError() { // How long we wait before forcibly shutting down the process. - const int kPluginProcessTerminateTimeoutMs = 3000; + const base::TimeDelta kPluginProcessTerminateTimeout = + base::TimeDelta::FromSeconds(3); // Ensure that we don't wait indefinitely for the plugin to shutdown. // as the browser does not terminate plugin processes on shutdown. // We achieve this by posting an exit process task on the IO thread. MessageLoop::current()->PostDelayedTask( FROM_HERE, base::Bind(&EnsureTerminateMessageFilter::Terminate, this), - kPluginProcessTerminateTimeoutMs); + kPluginProcessTerminateTimeout); } void Terminate() { |