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

Unified Diff: chrome/renderer/translate_helper.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/net/renderer_net_predictor.cc ('k') | content/browser/browser_child_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/translate_helper.cc
===================================================================
--- chrome/renderer/translate_helper.cc (revision 117824)
+++ chrome/renderer/translate_helper.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -28,7 +28,7 @@
using WebKit::WebString;
using WebKit::WebView;
-// The delay in milliseconds that we'll wait before checking to see if the
+// The delay in millliseconds that we'll wait before checking to see if the
// translate library injected in the page is ready.
static const int kTranslateInitCheckDelayMs = 150;
@@ -339,12 +339,10 @@
}
// The translation is still pending, check again later.
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
+ MessageLoop::current()->PostDelayedTask(FROM_HERE,
base::Bind(&TranslateHelper::CheckTranslateStatus,
weak_method_factory_.GetWeakPtr()),
- base::TimeDelta::FromMilliseconds(
- DontDelayTasks() ? 0 : kTranslateStatusCheckDelayMs));
+ DontDelayTasks() ? 0 : kTranslateStatusCheckDelayMs);
}
bool TranslateHelper::ExecuteScript(const std::string& script) {
@@ -403,12 +401,10 @@
NotifyBrowserTranslationFailed(TranslateErrors::INITIALIZATION_ERROR);
return;
}
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
+ MessageLoop::current()->PostDelayedTask(FROM_HERE,
base::Bind(&TranslateHelper::TranslatePageImpl,
weak_method_factory_.GetWeakPtr(), count),
- base::TimeDelta::FromMilliseconds(
- DontDelayTasks() ? 0 : count * kTranslateInitCheckDelayMs));
+ DontDelayTasks() ? 0 : count * kTranslateInitCheckDelayMs);
return;
}
@@ -417,12 +413,10 @@
return;
}
// Check the status of the translation.
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
+ MessageLoop::current()->PostDelayedTask(FROM_HERE,
base::Bind(&TranslateHelper::CheckTranslateStatus,
weak_method_factory_.GetWeakPtr()),
- base::TimeDelta::FromMilliseconds(
- DontDelayTasks() ? 0 : kTranslateStatusCheckDelayMs));
+ DontDelayTasks() ? 0 : kTranslateStatusCheckDelayMs);
}
void TranslateHelper::NotifyBrowserTranslationFailed(
« no previous file with comments | « chrome/renderer/net/renderer_net_predictor.cc ('k') | content/browser/browser_child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698