OLD | NEW |
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/settings_frontend.h" | 5 #include "chrome/browser/extensions/settings/settings_frontend.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "chrome/browser/extensions/extension_event_names.h" | 10 #include "chrome/browser/extensions/extension_event_names.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 const SettingsFrontend::StorageCallback& callback, | 84 const SettingsFrontend::StorageCallback& callback, |
85 SettingsBackend* backend) { | 85 SettingsBackend* backend) { |
86 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 86 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
87 WeakUnlimitedSettingsStorage unlimited_storage( | 87 WeakUnlimitedSettingsStorage unlimited_storage( |
88 backend->GetStorage(extension_id)); | 88 backend->GetStorage(extension_id)); |
89 callback.Run(&unlimited_storage); | 89 callback.Run(&unlimited_storage); |
90 } | 90 } |
91 | 91 |
92 SettingsStorageQuotaEnforcer::Limits GetLocalLimits() { | 92 SettingsStorageQuotaEnforcer::Limits GetLocalLimits() { |
93 SettingsStorageQuotaEnforcer::Limits limits = { | 93 SettingsStorageQuotaEnforcer::Limits limits = { |
94 api::storage::local::QUOTA_BYTES, | 94 static_cast<size_t>(api::storage::local::QUOTA_BYTES), |
95 UINT_MAX, | 95 std::numeric_limits<size_t>::max(), |
96 UINT_MAX | 96 std::numeric_limits<size_t>::max() |
97 }; | 97 }; |
98 return limits; | 98 return limits; |
99 } | 99 } |
100 | 100 |
101 SettingsStorageQuotaEnforcer::Limits GetSyncLimits() { | 101 SettingsStorageQuotaEnforcer::Limits GetSyncLimits() { |
102 SettingsStorageQuotaEnforcer::Limits limits = { | 102 SettingsStorageQuotaEnforcer::Limits limits = { |
103 static_cast<size_t>(api::storage::sync::QUOTA_BYTES), | 103 static_cast<size_t>(api::storage::sync::QUOTA_BYTES), |
104 static_cast<size_t>(api::storage::sync::QUOTA_BYTES_PER_ITEM), | 104 static_cast<size_t>(api::storage::sync::QUOTA_BYTES_PER_ITEM), |
105 static_cast<size_t>(api::storage::sync::MAX_ITEMS) | 105 static_cast<size_t>(api::storage::sync::MAX_ITEMS) |
106 }; | 106 }; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 336 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
337 return observers_; | 337 return observers_; |
338 } | 338 } |
339 | 339 |
340 // BackendWrappers | 340 // BackendWrappers |
341 | 341 |
342 SettingsFrontend::BackendWrappers::BackendWrappers() {} | 342 SettingsFrontend::BackendWrappers::BackendWrappers() {} |
343 SettingsFrontend::BackendWrappers::~BackendWrappers() {} | 343 SettingsFrontend::BackendWrappers::~BackendWrappers() {} |
344 | 344 |
345 } // namespace extensions | 345 } // namespace extensions |
OLD | NEW |