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

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

Issue 11946017: Remove old cloud policy code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/policy/delayed_work_scheduler.h"
6
7 namespace policy {
8
9 DelayedWorkScheduler::DelayedWorkScheduler() {
10 }
11
12 DelayedWorkScheduler::~DelayedWorkScheduler() {
13 timer_.Stop();
14 }
15
16 void DelayedWorkScheduler::DoDelayedWork() {
17 callback_.Run();
18 }
19
20 void DelayedWorkScheduler::CancelDelayedWork() {
21 timer_.Stop();
22 }
23
24 void DelayedWorkScheduler::PostDelayedWork(
25 const base::Closure& callback,
26 int64 delay) {
27 callback_ = callback;
28 timer_.Start(FROM_HERE,
29 base::TimeDelta::FromMilliseconds(delay),
30 this,
31 &DelayedWorkScheduler::DoDelayedWork);
32 }
33
34 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/delayed_work_scheduler.h ('k') | chrome/browser/policy/device_policy_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698