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/syncable_settings_storage.h" | 5 #include "chrome/browser/extensions/settings/syncable_settings_storage.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "chrome/browser/extensions/settings/settings_namespace.h" | 8 #include "chrome/browser/extensions/settings/settings_namespace.h" |
9 #include "chrome/browser/extensions/settings/settings_sync_util.h" | 9 #include "chrome/browser/extensions/settings/settings_sync_util.h" |
10 #include "chrome/browser/sync/api/sync_data.h" | 10 #include "chrome/browser/sync/api/sync_data.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 delegate_(delegate), | 25 delegate_(delegate), |
26 sync_type_(syncable::UNSPECIFIED), | 26 sync_type_(syncable::UNSPECIFIED), |
27 sync_processor_(NULL) { | 27 sync_processor_(NULL) { |
28 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 28 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
29 } | 29 } |
30 | 30 |
31 SyncableSettingsStorage::~SyncableSettingsStorage() { | 31 SyncableSettingsStorage::~SyncableSettingsStorage() { |
32 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 32 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
33 } | 33 } |
34 | 34 |
| 35 size_t SyncableSettingsStorage::GetBytesInUse() { |
| 36 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| 37 return delegate_->GetBytesInUse(); |
| 38 } |
| 39 |
35 SettingsStorage::ReadResult SyncableSettingsStorage::Get( | 40 SettingsStorage::ReadResult SyncableSettingsStorage::Get( |
36 const std::string& key) { | 41 const std::string& key) { |
37 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 42 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
38 return delegate_->Get(key); | 43 return delegate_->Get(key); |
39 } | 44 } |
40 | 45 |
41 SettingsStorage::ReadResult SyncableSettingsStorage::Get( | 46 SettingsStorage::ReadResult SyncableSettingsStorage::Get( |
42 const std::vector<std::string>& keys) { | 47 const std::vector<std::string>& keys) { |
43 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 48 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
44 return delegate_->Get(keys); | 49 return delegate_->Get(keys); |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 FROM_HERE, | 440 FROM_HERE, |
436 std::string("Error pushing sync remove to local settings: ") + | 441 std::string("Error pushing sync remove to local settings: ") + |
437 result.error(), | 442 result.error(), |
438 sync_type_); | 443 sync_type_); |
439 } | 444 } |
440 changes->push_back(SettingChange(key, old_value, NULL)); | 445 changes->push_back(SettingChange(key, old_value, NULL)); |
441 return SyncError(); | 446 return SyncError(); |
442 } | 447 } |
443 | 448 |
444 } // namespace extensions | 449 } // namespace extensions |
OLD | NEW |