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 #include "extensions/browser/api/storage/local_value_store_cache.h" | 5 #include "extensions/browser/api/storage/local_value_store_cache.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 #include "extensions/browser/api/storage/weak_unlimited_settings_storage.h" | 12 #include "extensions/browser/api/storage/weak_unlimited_settings_storage.h" |
13 #include "extensions/browser/value_store/value_store_factory.h" | 13 #include "extensions/browser/value_store/value_store_factory.h" |
14 #include "extensions/common/api/storage.h" | 14 #include "extensions/common/api/storage.h" |
| 15 #include "extensions/common/extension.h" |
15 #include "extensions/common/permissions/permissions_data.h" | 16 #include "extensions/common/permissions/permissions_data.h" |
16 | 17 |
17 using content::BrowserThread; | 18 using content::BrowserThread; |
18 | 19 |
19 namespace extensions { | 20 namespace extensions { |
20 | 21 |
21 namespace { | 22 namespace { |
22 | 23 |
23 // Returns the quota limit for local storage, taken from the schema in | 24 // Returns the quota limit for local storage, taken from the schema in |
24 // extensions/common/api/storage.json. | 25 // extensions/common/api/storage.json. |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 settings_namespace::LOCAL, model_type, extension->id()); | 83 settings_namespace::LOCAL, model_type, extension->id()); |
83 linked_ptr<SettingsStorageQuotaEnforcer> storage( | 84 linked_ptr<SettingsStorageQuotaEnforcer> storage( |
84 new SettingsStorageQuotaEnforcer(quota_, std::move(store))); | 85 new SettingsStorageQuotaEnforcer(quota_, std::move(store))); |
85 DCHECK(storage.get()); | 86 DCHECK(storage.get()); |
86 | 87 |
87 storage_map_[extension->id()] = storage; | 88 storage_map_[extension->id()] = storage; |
88 return storage.get(); | 89 return storage.get(); |
89 } | 90 } |
90 | 91 |
91 } // namespace extensions | 92 } // namespace extensions |
OLD | NEW |