| 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/value_store/testing_value_store.h" | 5 #include "chrome/browser/value_store/testing_value_store.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 | 10 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 ValueStore::WriteResult TestingValueStore::Clear() { | 118 ValueStore::WriteResult TestingValueStore::Clear() { |
| 119 std::vector<std::string> keys; | 119 std::vector<std::string> keys; |
| 120 for (base::DictionaryValue::Iterator it(storage_); | 120 for (base::DictionaryValue::Iterator it(storage_); |
| 121 !it.IsAtEnd(); it.Advance()) { | 121 !it.IsAtEnd(); it.Advance()) { |
| 122 keys.push_back(it.key()); | 122 keys.push_back(it.key()); |
| 123 } | 123 } |
| 124 return Remove(keys); | 124 return Remove(keys); |
| 125 } | 125 } |
| 126 | 126 |
| 127 bool TestingValueStore::Restore() { |
| 128 return true; |
| 129 } |
| 130 |
| 131 bool TestingValueStore::RestoreKey(const std::string& key) { |
| 132 return true; |
| 133 } |
| 134 |
| 127 scoped_ptr<ValueStore::Error> TestingValueStore::TestingError() { | 135 scoped_ptr<ValueStore::Error> TestingValueStore::TestingError() { |
| 128 return make_scoped_ptr(new ValueStore::Error( | 136 return make_scoped_ptr(new ValueStore::Error( |
| 129 error_code_, kGenericErrorMessage, scoped_ptr<std::string>())); | 137 error_code_, kGenericErrorMessage, scoped_ptr<std::string>())); |
| 130 } | 138 } |
| OLD | NEW |