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

Side by Side Diff: extensions/browser/api/storage/settings_storage_quota_enforcer.h

Issue 189263013: Move extensions storage API implementation to src/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_STORAGE_QUOTA_ENFORCER_H_ 5 #ifndef EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_STORAGE_QUOTA_ENFORCER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_STORAGE_QUOTA_ENFORCER_H_ 6 #define EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_STORAGE_QUOTA_ENFORCER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "extensions/browser/value_store/value_store.h" 10 #include "extensions/browser/value_store/value_store.h"
11 11
12 namespace extensions { 12 namespace extensions {
13 13
14 // Enforces total quota and a per-setting quota in bytes, and a maximum number 14 // Enforces total quota and a per-setting quota in bytes, and a maximum number
15 // of setting keys, for a delegate storage area. 15 // of setting keys, for a delegate storage area.
16 class SettingsStorageQuotaEnforcer : public ValueStore { 16 class SettingsStorageQuotaEnforcer : public ValueStore {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 size_t used_total_; 66 size_t used_total_;
67 67
68 // Map of item key to its size, including the key itself. 68 // Map of item key to its size, including the key itself.
69 std::map<std::string, size_t> used_per_setting_; 69 std::map<std::string, size_t> used_per_setting_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(SettingsStorageQuotaEnforcer); 71 DISALLOW_COPY_AND_ASSIGN(SettingsStorageQuotaEnforcer);
72 }; 72 };
73 73
74 } // namespace extensions 74 } // namespace extensions
75 75
76 #endif // CHROME_BROWSER_EXTENSIONS_API_STORAGE_SETTINGS_STORAGE_QUOTA_ENFORCER _H_ 76 #endif // EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_STORAGE_QUOTA_ENFORCER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698