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 #ifndef EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_UTIL_H_
6 #define EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_UTIL_H_
10 #include "base/memory/scoped_ptr.h"
11 #include "extensions/browser/value_store/value_store.h"
13 namespace value_store_util
{
15 // Returns a copy of |key| as a scoped_ptr. Useful for creating keys for
17 scoped_ptr
<std::string
> NewKey(const std::string
& key
);
19 // Returns an empty scoped_ptr. Useful for creating empty keys for
21 scoped_ptr
<std::string
> NoKey();
23 // Return an empty Error. Useful for creating ValueStore::Error-less
24 // ValueStore::Read/WriteResults.
25 scoped_ptr
<ValueStore::Error
> NoError();
27 } // namespace value_store_util
29 #endif // EXTENSIONS_BROWSER_VALUE_STORE_VALUE_STORE_UTIL_H_