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

Unified Diff: chrome/browser/sync/sync_stopped_reporter.cc

Issue 1229853004: Base: Make TimeDelta constructors deal with overflow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove static initializers Created 5 years, 5 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 | « cc/scheduler/compositor_timing_history.cc ('k') | ui/gl/gl_surface_glx.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sync_stopped_reporter.cc
diff --git a/chrome/browser/sync/sync_stopped_reporter.cc b/chrome/browser/sync/sync_stopped_reporter.cc
index ef7f92c092559498825beaddf0dbf38c2641e6e0..917fe2e19a9f3f0fb97ced88cdf20bb5fed34c0d 100644
--- a/chrome/browser/sync/sync_stopped_reporter.cc
+++ b/chrome/browser/sync/sync_stopped_reporter.cc
@@ -27,7 +27,7 @@ const char kEventEndpoint[] = "event";
// plenty of time. Since sync is off when this request is started, we don't
// want anything sync-related hanging around for very long from a human
// perspective either. This seems like a good compromise.
-const base::TimeDelta kRequestTimeout = base::TimeDelta::FromSeconds(10);
+const int kRequestTimeoutSeconds = 10;
std::string GetUserAgent() {
chrome::VersionInfo version_info;
@@ -85,8 +85,8 @@ void SyncStoppedReporter::ReportSyncStopped(const std::string& access_token,
net::LOAD_DO_NOT_SAVE_COOKIES |
net::LOAD_DO_NOT_SEND_COOKIES);
fetcher_->Start();
- timer_.Start(FROM_HERE, kRequestTimeout, this,
- &SyncStoppedReporter::OnTimeout);
+ timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(kRequestTimeoutSeconds),
+ this, &SyncStoppedReporter::OnTimeout);
}
void SyncStoppedReporter::OnURLFetchComplete(const net::URLFetcher* source) {
« no previous file with comments | « cc/scheduler/compositor_timing_history.cc ('k') | ui/gl/gl_surface_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698