| 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" | |
| 10 #include "chrome/browser/value_store/value_store_change.h" | 9 #include "chrome/browser/value_store/value_store_change.h" |
| 11 #include "chrome/browser/value_store/value_store_util.h" | 10 #include "chrome/browser/value_store/value_store_util.h" |
| 12 #include "components/policy/core/common/policy_map.h" | 11 #include "components/policy/core/common/policy_map.h" |
| 13 #include "components/policy/core/common/policy_types.h" | 12 #include "components/policy/core/common/policy_types.h" |
| 14 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
| 14 #include "extensions/browser/api/storage/settings_namespace.h" |
| 15 | 15 |
| 16 using content::BrowserThread; | 16 using content::BrowserThread; |
| 17 | 17 |
| 18 namespace util = value_store_util; | 18 namespace util = value_store_util; |
| 19 | 19 |
| 20 namespace extensions { | 20 namespace extensions { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 scoped_ptr<ValueStore::Error> ReadOnlyError(scoped_ptr<std::string> key) { | 24 scoped_ptr<ValueStore::Error> ReadOnlyError(scoped_ptr<std::string> key) { |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 return MakeWriteResult(ReadOnlyError(util::NoKey())); | 172 return MakeWriteResult(ReadOnlyError(util::NoKey())); |
| 173 } | 173 } |
| 174 | 174 |
| 175 bool PolicyValueStore::Restore() { return delegate_->Restore(); } | 175 bool PolicyValueStore::Restore() { return delegate_->Restore(); } |
| 176 | 176 |
| 177 bool PolicyValueStore::RestoreKey(const std::string& key) { | 177 bool PolicyValueStore::RestoreKey(const std::string& key) { |
| 178 return delegate_->RestoreKey(key); | 178 return delegate_->RestoreKey(key); |
| 179 } | 179 } |
| 180 | 180 |
| 181 } // namespace extensions | 181 } // namespace extensions |
| OLD | NEW |