Finish refactoring of DomCodeToUsLayoutKeyboardCode().
[chromium-blink-merge.git] / extensions / browser / value_store / value_store.cc
blob0b87b5fd187d472444426b37ab48643ab2545d6d
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()) {
22 CHECK(settings_);
25 ValueStore::ReadResultType::ReadResultType(scoped_ptr<Error> error)
26 : error_(error.Pass()) {
27 CHECK(error_);
30 ValueStore::ReadResultType::~ReadResultType() {}
32 // Implementation of WriteResultType.
34 ValueStore::WriteResultType::WriteResultType(
35 scoped_ptr<ValueStoreChangeList> changes)
36 : changes_(changes.Pass()) {
37 CHECK(changes_);
40 ValueStore::WriteResultType::WriteResultType(scoped_ptr<Error> error)
41 : error_(error.Pass()) {
42 CHECK(error_);
45 ValueStore::WriteResultType::~WriteResultType() {}