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

Side by Side Diff: components/policy/core/common/cloud/rate_limiter.cc

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 years 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/cloud/rate_limiter.h" 5 #include "components/policy/core/common/cloud/rate_limiter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/sequenced_task_runner.h" 11 #include "base/sequenced_task_runner.h"
12 #include "base/time/tick_clock.h" 12 #include "base/time/tick_clock.h"
13 13
14 namespace policy { 14 namespace policy {
15 15
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 const base::TimeDelta time_until_next_callback = 49 const base::TimeDelta time_until_next_callback =
50 invocation_times_.front() - period_start; 50 invocation_times_.front() - period_start;
51 delayed_callback_.Reset( 51 delayed_callback_.Reset(
52 base::Bind(&RateLimiter::PostRequest, base::Unretained(this))); 52 base::Bind(&RateLimiter::PostRequest, base::Unretained(this)));
53 task_runner_->PostDelayedTask( 53 task_runner_->PostDelayedTask(
54 FROM_HERE, delayed_callback_.callback(), time_until_next_callback); 54 FROM_HERE, delayed_callback_.callback(), time_until_next_callback);
55 } 55 }
56 } 56 }
57 57
58 } // namespace policy 58 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/cloud/rate_limiter.h ('k') | components/policy/core/common/cloud/rate_limiter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698