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

Side by Side Diff: chrome/browser/extensions/settings/weak_unlimited_settings_storage.cc

Issue 9284013: Extension Storage API: expose storage quota information to extensions, via: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with use-after-free fixed Created 8 years, 11 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 #include "chrome/browser/extensions/settings/weak_unlimited_settings_storage.h" 5 #include "chrome/browser/extensions/settings/weak_unlimited_settings_storage.h"
6 6
7 namespace extensions { 7 namespace extensions {
8 8
9 WeakUnlimitedSettingsStorage::WeakUnlimitedSettingsStorage( 9 WeakUnlimitedSettingsStorage::WeakUnlimitedSettingsStorage(
10 SettingsStorage* delegate) 10 SettingsStorage* delegate)
11 : delegate_(delegate) {} 11 : delegate_(delegate) {}
12 12
13 WeakUnlimitedSettingsStorage::~WeakUnlimitedSettingsStorage() {} 13 WeakUnlimitedSettingsStorage::~WeakUnlimitedSettingsStorage() {}
14 14
15 size_t WeakUnlimitedSettingsStorage::GetBytesInUse(const std::string& key) {
16 return delegate_->GetBytesInUse(key);
17 }
18
19 size_t WeakUnlimitedSettingsStorage::GetBytesInUse(
20 const std::vector<std::string>& keys) {
21 return delegate_->GetBytesInUse(keys);
22 }
23
24
25 size_t WeakUnlimitedSettingsStorage::GetBytesInUse() {
26 return delegate_->GetBytesInUse();
27 }
28
15 SettingsStorage::ReadResult WeakUnlimitedSettingsStorage::Get( 29 SettingsStorage::ReadResult WeakUnlimitedSettingsStorage::Get(
16 const std::string& key) { 30 const std::string& key) {
17 return delegate_->Get(key); 31 return delegate_->Get(key);
18 } 32 }
19 33
20 SettingsStorage::ReadResult WeakUnlimitedSettingsStorage::Get( 34 SettingsStorage::ReadResult WeakUnlimitedSettingsStorage::Get(
21 const std::vector<std::string>& keys) { 35 const std::vector<std::string>& keys) {
22 return delegate_->Get(keys); 36 return delegate_->Get(keys);
23 } 37 }
24 38
(...skipping 19 matching lines...) Expand all
44 SettingsStorage::WriteResult WeakUnlimitedSettingsStorage::Remove( 58 SettingsStorage::WriteResult WeakUnlimitedSettingsStorage::Remove(
45 const std::vector<std::string>& keys) { 59 const std::vector<std::string>& keys) {
46 return delegate_->Remove(keys); 60 return delegate_->Remove(keys);
47 } 61 }
48 62
49 SettingsStorage::WriteResult WeakUnlimitedSettingsStorage::Clear() { 63 SettingsStorage::WriteResult WeakUnlimitedSettingsStorage::Clear() {
50 return delegate_->Clear(); 64 return delegate_->Clear();
51 } 65 }
52 66
53 } // namespace extensions 67 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/settings/weak_unlimited_settings_storage.h ('k') | chrome/common/extensions/api/storage.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698