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

Side by Side Diff: chrome/browser/extensions/api/storage/policy_value_store.cc

Issue 165223003: Add a Restore() method to ValueStore and make StorageAPI use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bens Created 6 years, 10 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
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/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
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() { return delegate_->Restore(); }
165
166 bool PolicyValueStore::RestoreKey(const std::string& key) {
167 return delegate_->RestoreKey(key);
168 }
169
164 } // namespace extensions 170 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698