Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Unified Diff: chrome/browser/value_store/value_store_util.h

Issue 24021002: Propagate more information about ValueStore errors to callers, notably an (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add Pass*() Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/value_store/value_store_unittest.cc ('k') | chrome/browser/value_store/value_store_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/value_store/value_store_util.h
diff --git a/chrome/browser/value_store/value_store_util.h b/chrome/browser/value_store/value_store_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..e35f1baa77ec55a13da29d54e08794af0510fda3
--- /dev/null
+++ b/chrome/browser/value_store/value_store_util.h
@@ -0,0 +1,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_
« no previous file with comments | « chrome/browser/value_store/value_store_unittest.cc ('k') | chrome/browser/value_store/value_store_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698