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

Side by Side Diff: chrome/browser/policy/delayed_work_scheduler.cc

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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/browser/oom_priority_manager.cc ('k') | chrome/browser/prerender/prerender_manager.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) 2011 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 "chrome/browser/policy/delayed_work_scheduler.h" 5 #include "chrome/browser/policy/delayed_work_scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 24
25 void DelayedWorkScheduler::CancelDelayedWork() { 25 void DelayedWorkScheduler::CancelDelayedWork() {
26 timer_.Stop(); 26 timer_.Stop();
27 } 27 }
28 28
29 void DelayedWorkScheduler::PostDelayedWork( 29 void DelayedWorkScheduler::PostDelayedWork(
30 const base::Closure& callback, 30 const base::Closure& callback,
31 int64 delay) { 31 int64 delay) {
32 callback_ = callback; 32 callback_ = callback;
33 timer_.Start(FROM_HERE, 33 timer_.Start(base::TimeDelta::FromMilliseconds(delay),
34 base::TimeDelta::FromMilliseconds(delay),
35 this, 34 this,
36 &DelayedWorkScheduler::DoDelayedWork); 35 &DelayedWorkScheduler::DoDelayedWork);
37 } 36 }
38 37
39 } // namespace policy 38 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/oom_priority_manager.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698