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

Unified Diff: chrome/browser/bookmarks/bookmark_extension_api.cc

Issue 8690005: Remove 4 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cin Created 9 years, 1 month 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 | « no previous file | chrome/browser/sync/syncable/directory_backing_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_extension_api.cc
diff --git a/chrome/browser/bookmarks/bookmark_extension_api.cc b/chrome/browser/bookmarks/bookmark_extension_api.cc
index b6889ae1329ae0ba0e9ade2e2cb96192010530a7..6c157ac1e06fc90ad692d094c4b084dab6ca4b91 100644
--- a/chrome/browser/bookmarks/bookmark_extension_api.cc
+++ b/chrome/browser/bookmarks/bookmark_extension_api.cc
@@ -794,6 +794,15 @@ class BookmarksQuotaLimitFactory {
private:
static void BuildWithMappers(QuotaLimitHeuristics* heuristics,
BucketMapper* short_mapper, BucketMapper* long_mapper) {
+ const Config kShortLimitConfig = {
+ 2, // 2 tokens per interval.
+ TimeDelta::FromMinutes(1) // 1 minute long refill interval.
+ };
+ const Config kLongLimitConfig = {
+ 100, // 100 tokens per interval.
+ TimeDelta::FromHours(1) // 1 hour long refill interval.
+ };
+
TimedLimit* timed = new TimedLimit(kLongLimitConfig, long_mapper);
// A max of two operations per minute, sustained over 10 minutes.
SustainedLimit* sustained = new SustainedLimit(TimeDelta::FromMinutes(10),
@@ -802,23 +811,9 @@ class BookmarksQuotaLimitFactory {
heuristics->push_back(sustained);
}
- // The quota configurations used for all BookmarkFunctions.
- static const Config kShortLimitConfig;
- static const Config kLongLimitConfig;
-
DISALLOW_IMPLICIT_CONSTRUCTORS(BookmarksQuotaLimitFactory);
};
-const Config BookmarksQuotaLimitFactory::kShortLimitConfig = {
- 2, // 2 tokens per interval.
- TimeDelta::FromMinutes(1) // 1 minute long refill interval.
-};
-
-const Config BookmarksQuotaLimitFactory::kLongLimitConfig = {
- 100, // 100 tokens per interval.
- TimeDelta::FromHours(1) // 1 hour long refill interval.
-};
-
// And finally, building the individual heuristics for each function.
void RemoveBookmarkFunction::GetQuotaLimitHeuristics(
QuotaLimitHeuristics* heuristics) const {
« no previous file with comments | « no previous file | chrome/browser/sync/syncable/directory_backing_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698