summaryrefslogtreecommitdiffstats
path: root/chrome/browser/value_store/value_store_util.h
blob: e35f1baa77ec55a13da29d54e08794af0510fda3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_VALUE_STORE_VALUE_STORE_UTIL_H_
#define CHROME_BROWSER_VALUE_STORE_VALUE_STORE_UTIL_H_

#include <string>

#include "base/memory/scoped_ptr.h"
#include "chrome/browser/value_store/value_store.h"

namespace value_store_util {

// Returns a copy of |key| as a scoped_ptr. Useful for creating keys for
// ValueStore::Error.
scoped_ptr<std::string> NewKey(const std::string& key);

// Returns an empty scoped_ptr. Useful for creating empty keys for
// ValueStore::Error.
scoped_ptr<std::string> NoKey();

// Return an empty Error. Useful for creating ValueStore::Error-less
// ValueStore::Read/WriteResults.
scoped_ptr<ValueStore::Error> NoError();

}  // namespace value_store_util

#endif  // CHROME_BROWSER_VALUE_STORE_VALUE_STORE_UTIL_H_