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

Side by Side Diff: extensions/browser/api/storage/local_value_store_cache.cc

Issue 2106073006: [Extensions] Pull ExtensionId into its own file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 #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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698