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

Unified Diff: components/policy/core/common/cloud/rate_limiter.h

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 side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/cloud/rate_limiter.h
diff --git a/chrome/browser/policy/cloud/rate_limiter.h b/components/policy/core/common/cloud/rate_limiter.h
similarity index 85%
rename from chrome/browser/policy/cloud/rate_limiter.h
rename to components/policy/core/common/cloud/rate_limiter.h
index 00af48dd4215278b9477fd79c5033ecc62d8c3ab..59492572ef0b5fc29beac77d55829c48559822e8 100644
--- a/chrome/browser/policy/cloud/rate_limiter.h
+++ b/components/policy/core/common/cloud/rate_limiter.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_POLICY_CLOUD_RATE_LIMITER_H_
-#define CHROME_BROWSER_POLICY_CLOUD_RATE_LIMITER_H_
+#ifndef COMPONENTS_POLICY_CORE_COMMON_CLOUD_RATE_LIMITER_H_
+#define COMPONENTS_POLICY_CORE_COMMON_CLOUD_RATE_LIMITER_H_
#include <queue>
@@ -14,6 +14,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "base/time/time.h"
+#include "components/policy/policy_export.h"
namespace base {
class SequencedTaskRunner;
@@ -23,7 +24,7 @@ class TickClock;
namespace policy {
// A simple class to limit the rate at which a callback is invoked.
-class RateLimiter : public base::NonThreadSafe {
+class POLICY_EXPORT RateLimiter : public base::NonThreadSafe {
public:
// Will limit invocations of |callback| to |max_requests| per |duration|.
// |task_runner| is used to post delayed tasks, and |clock| is used to
@@ -56,4 +57,4 @@ class RateLimiter : public base::NonThreadSafe {
} // namespace policy
-#endif // CHROME_BROWSER_POLICY_CLOUD_RATE_LIMITER_H_
+#endif // COMPONENTS_POLICY_CORE_COMMON_CLOUD_RATE_LIMITER_H_
« no previous file with comments | « components/policy/core/common/cloud/policy_builder.cc ('k') | components/policy/core/common/cloud/rate_limiter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698