- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / value_store / value_store.cc
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/value_store/value_store.h"
6
7 #include "base/logging.h"
8
9 // Implementation of Error.
10
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()) {}
15
16 ValueStore::Error::~Error() {}
17
18 // Implementation of ReadResultType.
19
20 ValueStore::ReadResultType::ReadResultType(scoped_ptr<DictionaryValue> settings)
21     : settings_(settings.Pass()) {
22   CHECK(settings_);
23 }
24
25 ValueStore::ReadResultType::ReadResultType(scoped_ptr<Error> error)
26     : error_(error.Pass()) {
27   CHECK(error_);
28 }
29
30 ValueStore::ReadResultType::~ReadResultType() {}
31
32 // Implementation of WriteResultType.
33
34 ValueStore::WriteResultType::WriteResultType(
35     scoped_ptr<ValueStoreChangeList> changes)
36     : changes_(changes.Pass()) {
37   CHECK(changes_);
38 }
39
40 ValueStore::WriteResultType::WriteResultType(scoped_ptr<Error> error)
41     : error_(error.Pass()) {
42   CHECK(error_);
43 }
44
45 ValueStore::WriteResultType::~WriteResultType() {}