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

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

Issue 1549643002: Switch to standard integer types in extensions/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clean
Patch Set: Created 4 years, 12 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_STORAGE_QUOTA_ENFORCER_H_ 5 #ifndef EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_STORAGE_QUOTA_ENFORCER_H_
6 #define EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_STORAGE_QUOTA_ENFORCER_H_ 6 #define EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_STORAGE_QUOTA_ENFORCER_H_
7 7
8 #include <stddef.h>
9
8 #include <map> 10 #include <map>
9 #include <string> 11 #include <string>
10 #include <vector> 12 #include <vector>
11 13
12 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
14 #include "extensions/browser/value_store/value_store.h" 17 #include "extensions/browser/value_store/value_store.h"
15 18
16 namespace extensions { 19 namespace extensions {
17 20
18 // Enforces total quota and a per-setting quota in bytes, and a maximum number 21 // Enforces total quota and a per-setting quota in bytes, and a maximum number
19 // of setting keys, for a delegate storage area. 22 // of setting keys, for a delegate storage area.
20 class SettingsStorageQuotaEnforcer : public ValueStore { 23 class SettingsStorageQuotaEnforcer : public ValueStore {
21 public: 24 public:
22 struct Limits { 25 struct Limits {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 81
79 // Map of item key to its size, including the key itself. 82 // Map of item key to its size, including the key itself.
80 std::map<std::string, size_t> used_per_setting_; 83 std::map<std::string, size_t> used_per_setting_;
81 84
82 DISALLOW_COPY_AND_ASSIGN(SettingsStorageQuotaEnforcer); 85 DISALLOW_COPY_AND_ASSIGN(SettingsStorageQuotaEnforcer);
83 }; 86 };
84 87
85 } // namespace extensions 88 } // namespace extensions
86 89
87 #endif // EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_STORAGE_QUOTA_ENFORCER_H_ 90 #endif // EXTENSIONS_BROWSER_API_STORAGE_SETTINGS_STORAGE_QUOTA_ENFORCER_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/storage/settings_quota_unittest.cc ('k') | extensions/browser/api/storage/storage_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698