| 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 "chrome/browser/extensions/api/storage/sync_value_store_cache.h" | 5 #include "chrome/browser/extensions/api/storage/sync_value_store_cache.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "chrome/browser/extensions/api/storage/sync_storage_backend.h" | 9 #include "chrome/browser/extensions/api/storage/sync_storage_backend.h" |
| 10 #include "chrome/browser/sync/glue/sync_start_util.h" | 10 #include "chrome/browser/sync/glue/sync_start_util.h" |
| 11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
| 12 #include "extensions/browser/value_store/value_store_factory.h" | 12 #include "extensions/browser/value_store/value_store_factory.h" |
| 13 #include "extensions/common/api/storage.h" | 13 #include "extensions/common/api/storage.h" |
| 14 #include "extensions/common/extension.h" |
| 14 | 15 |
| 15 using content::BrowserThread; | 16 using content::BrowserThread; |
| 16 | 17 |
| 17 namespace extensions { | 18 namespace extensions { |
| 18 | 19 |
| 19 namespace { | 20 namespace { |
| 20 | 21 |
| 21 // Returns the quota limit for sync storage, taken from the schema in | 22 // Returns the quota limit for sync storage, taken from the schema in |
| 22 // extensions/common/api/storage.json. | 23 // extensions/common/api/storage.json. |
| 23 SettingsStorageQuotaEnforcer::Limits GetSyncQuotaLimits() { | 24 SettingsStorageQuotaEnforcer::Limits GetSyncQuotaLimits() { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 extension_backend_.reset(new SyncStorageBackend( | 99 extension_backend_.reset(new SyncStorageBackend( |
| 99 factory, | 100 factory, |
| 100 GetSyncQuotaLimits(), | 101 GetSyncQuotaLimits(), |
| 101 observers, | 102 observers, |
| 102 syncer::EXTENSION_SETTINGS, | 103 syncer::EXTENSION_SETTINGS, |
| 103 sync_start_util::GetFlareForSyncableService(profile_path))); | 104 sync_start_util::GetFlareForSyncableService(profile_path))); |
| 104 initialized_ = true; | 105 initialized_ = true; |
| 105 } | 106 } |
| 106 | 107 |
| 107 } // namespace extensions | 108 } // namespace extensions |
| OLD | NEW |