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
3 // found in the LICENSE file.
5 #include "extensions/browser/value_store/value_store.h"
7 #include "base/logging.h"
9 // Implementation of Error.
11 ValueStore::Error::Error(ErrorCode code
,
12 const std::string
& message
,
13 scoped_ptr
<std::string
> key
)
14 : code(code
), message(message
), key(key
.Pass()) {}
16 ValueStore::Error::~Error() {}
18 // Implementation of ReadResultType.
20 ValueStore::ReadResultType::ReadResultType(
21 scoped_ptr
<base::DictionaryValue
> settings
) : settings_(settings
.Pass()) {
25 ValueStore::ReadResultType::ReadResultType(scoped_ptr
<Error
> error
)
26 : error_(error
.Pass()) {
30 ValueStore::ReadResultType::~ReadResultType() {}
32 // Implementation of WriteResultType.
34 ValueStore::WriteResultType::WriteResultType(
35 scoped_ptr
<ValueStoreChangeList
> changes
)
36 : changes_(changes
.Pass()) {
40 ValueStore::WriteResultType::WriteResultType(scoped_ptr
<Error
> error
)
41 : error_(error
.Pass()) {
45 ValueStore::WriteResultType::~WriteResultType() {}