OLD | NEW |
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_WEAK_UNLIMITED_SETTINGS_STORAGE_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_STORAGE_WEAK_UNLIMITED_SETTINGS_STORAGE_H_ |
6 #define EXTENSIONS_BROWSER_API_STORAGE_WEAK_UNLIMITED_SETTINGS_STORAGE_H_ | 6 #define EXTENSIONS_BROWSER_API_STORAGE_WEAK_UNLIMITED_SETTINGS_STORAGE_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" |
12 #include "extensions/browser/value_store/value_store.h" | 15 #include "extensions/browser/value_store/value_store.h" |
13 | 16 |
14 namespace extensions { | 17 namespace extensions { |
15 | 18 |
16 // A ValueStore decorator which makes calls through |Set| ignore quota. | 19 // A ValueStore decorator which makes calls through |Set| ignore quota. |
17 // "Weak" because ownership of the delegate isn't taken; this is designed to be | 20 // "Weak" because ownership of the delegate isn't taken; this is designed to be |
18 // temporarily attached to storage areas. | 21 // temporarily attached to storage areas. |
19 class WeakUnlimitedSettingsStorage : public ValueStore { | 22 class WeakUnlimitedSettingsStorage : public ValueStore { |
20 public: | 23 public: |
21 // Ownership of |delegate| NOT taken. | 24 // Ownership of |delegate| NOT taken. |
(...skipping 20 matching lines...) Expand all Loading... |
42 private: | 45 private: |
43 // The delegate storage area, NOT OWNED. | 46 // The delegate storage area, NOT OWNED. |
44 ValueStore* const delegate_; | 47 ValueStore* const delegate_; |
45 | 48 |
46 DISALLOW_COPY_AND_ASSIGN(WeakUnlimitedSettingsStorage); | 49 DISALLOW_COPY_AND_ASSIGN(WeakUnlimitedSettingsStorage); |
47 }; | 50 }; |
48 | 51 |
49 } // namespace extensions | 52 } // namespace extensions |
50 | 53 |
51 #endif // EXTENSIONS_BROWSER_API_STORAGE_WEAK_UNLIMITED_SETTINGS_STORAGE_H_ | 54 #endif // EXTENSIONS_BROWSER_API_STORAGE_WEAK_UNLIMITED_SETTINGS_STORAGE_H_ |
OLD | NEW |