Chromium Code Reviews| 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/api/storage/policy_value_store.h" | 5 #include "chrome/browser/extensions/api/storage/policy_value_store.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/extensions/api/storage/settings_namespace.h" | 9 #include "chrome/browser/extensions/api/storage/settings_namespace.h" |
| 10 #include "chrome/browser/value_store/value_store_change.h" | 10 #include "chrome/browser/value_store/value_store_change.h" |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 | 154 |
| 155 ValueStore::WriteResult PolicyValueStore::Remove( | 155 ValueStore::WriteResult PolicyValueStore::Remove( |
| 156 const std::vector<std::string>& keys) { | 156 const std::vector<std::string>& keys) { |
| 157 return MakeWriteResult(ReadOnlyError(util::NoKey())); | 157 return MakeWriteResult(ReadOnlyError(util::NoKey())); |
| 158 } | 158 } |
| 159 | 159 |
| 160 ValueStore::WriteResult PolicyValueStore::Clear() { | 160 ValueStore::WriteResult PolicyValueStore::Clear() { |
| 161 return MakeWriteResult(ReadOnlyError(util::NoKey())); | 161 return MakeWriteResult(ReadOnlyError(util::NoKey())); |
| 162 } | 162 } |
| 163 | 163 |
| 164 bool PolicyValueStore::Restore() { | |
| 165 return delegate_->Restore(); | |
|
not at google - send to devlin
2014/02/14 19:35:56
We should be able to restore from policy?
+joaoda
Devlin
2014/02/18 23:55:22
I think so, yes. The Policy stores, even though t
Joao da Silva
2014/02/19 08:32:03
This is fine. The PolicyValueStore is used to dete
not at google - send to devlin
2014/02/19 17:55:59
Ok. So there's no reason to restore them now? Devl
Joao da Silva
2014/02/19 18:05:43
I don't know how LevelDB handles corrupted databas
not at google - send to devlin
2014/02/19 18:13:53
Restore on the leveldb instance is really just for
| |
| 166 } | |
| 167 | |
| 168 bool PolicyValueStore::RestoreKey(const std::string& key) { | |
| 169 return delegate_->RestoreKey(key); | |
| 170 } | |
| 171 | |
| 164 } // namespace extensions | 172 } // namespace extensions |
| OLD | NEW |