| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/value_store/value_store.h" | 5 #include "extensions/browser/value_store/value_store.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 code = status.code; | 27 code = status.code; |
| 28 if (message.empty() && !status.message.empty()) | 28 if (message.empty() && !status.message.empty()) |
| 29 message = status.message; | 29 message = status.message; |
| 30 if (restore_status == RESTORE_NONE) | 30 if (restore_status == RESTORE_NONE) |
| 31 restore_status = status.restore_status; | 31 restore_status = status.restore_status; |
| 32 } | 32 } |
| 33 | 33 |
| 34 // Implementation of ReadResultType. | 34 // Implementation of ReadResultType. |
| 35 | 35 |
| 36 ValueStore::ReadResultType::ReadResultType( | 36 ValueStore::ReadResultType::ReadResultType( |
| 37 scoped_ptr<base::DictionaryValue> settings, | 37 std::unique_ptr<base::DictionaryValue> settings, |
| 38 const Status& status) | 38 const Status& status) |
| 39 : settings_(std::move(settings)), status_(status) { | 39 : settings_(std::move(settings)), status_(status) { |
| 40 CHECK(settings_); | 40 CHECK(settings_); |
| 41 } | 41 } |
| 42 | 42 |
| 43 ValueStore::ReadResultType::ReadResultType(const Status& status) | 43 ValueStore::ReadResultType::ReadResultType(const Status& status) |
| 44 : status_(status) {} | 44 : status_(status) {} |
| 45 | 45 |
| 46 ValueStore::ReadResultType::~ReadResultType() {} | 46 ValueStore::ReadResultType::~ReadResultType() {} |
| 47 | 47 |
| 48 // Implementation of WriteResultType. | 48 // Implementation of WriteResultType. |
| 49 | 49 |
| 50 ValueStore::WriteResultType::WriteResultType( | 50 ValueStore::WriteResultType::WriteResultType( |
| 51 scoped_ptr<ValueStoreChangeList> changes, | 51 std::unique_ptr<ValueStoreChangeList> changes, |
| 52 const Status& status) | 52 const Status& status) |
| 53 : changes_(std::move(changes)), status_(status) { | 53 : changes_(std::move(changes)), status_(status) { |
| 54 CHECK(changes_); | 54 CHECK(changes_); |
| 55 } | 55 } |
| 56 | 56 |
| 57 ValueStore::WriteResultType::WriteResultType(const Status& status) | 57 ValueStore::WriteResultType::WriteResultType(const Status& status) |
| 58 : status_(status) {} | 58 : status_(status) {} |
| 59 | 59 |
| 60 ValueStore::WriteResultType::~WriteResultType() {} | 60 ValueStore::WriteResultType::~WriteResultType() {} |
| OLD | NEW |