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

Unified Diff: chrome/browser/translate/translate_manager.h

Issue 9185026: Convert use of int ms to TimeDelta in files owned by brettw. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Explicitly include base/time.h in header file. 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/browser/task_manager/task_manager.cc ('k') | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_manager.h
diff --git a/chrome/browser/translate/translate_manager.h b/chrome/browser/translate/translate_manager.h
index 0dcf69586e76b2db45b80fff1a7ad930cdd71762..5646795b82c91ee5bbfb59e9e0c29d897ce54993 100644
--- a/chrome/browser/translate/translate_manager.h
+++ b/chrome/browser/translate/translate_manager.h
@@ -15,6 +15,7 @@
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/time.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/common/translate_errors.h"
#include "content/public/common/url_fetcher_delegate.h"
@@ -84,7 +85,8 @@ class TranslateManager : public content::NotificationObserver,
// Used by unit-tests to override the default delay after which the translate
// script is fetched again from the translation server.
void set_translate_script_expiration_delay(int delay_ms) {
- translate_script_expiration_delay_ = delay_ms;
+ translate_script_expiration_delay_ =
+ base::TimeDelta::FromMilliseconds(delay_ms);
}
// Convenience method to know if a tab is showing a translate infobar.
@@ -201,9 +203,9 @@ class TranslateManager : public content::NotificationObserver,
// The JS injected in the page to do the translation.
std::string translate_script_;
- // Delay in milli-seconds after which the translate script is fetched again
+ // Delay after which the translate script is fetched again
// from the translate server.
- int translate_script_expiration_delay_;
+ base::TimeDelta translate_script_expiration_delay_;
// Set when the translate JS is currently being retrieved. NULL otherwise.
scoped_ptr<content::URLFetcher> translate_script_request_pending_;
« no previous file with comments | « chrome/browser/task_manager/task_manager.cc ('k') | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698