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

Unified Diff: src/platform/update_engine/simple_key_value_store.h

Issue 2105016: AU: Common code to parse simple key/value store files (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 years, 7 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
Index: src/platform/update_engine/simple_key_value_store.h
diff --git a/src/platform/update_engine/simple_key_value_store.h b/src/platform/update_engine/simple_key_value_store.h
new file mode 100644
index 0000000000000000000000000000000000000000..6453eeecdab448a2c11a35a6b913b0c50acde98e
--- /dev/null
+++ b/src/platform/update_engine/simple_key_value_store.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2010 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.
+
+// These functions can parse a blob of data that's formatted as a simple
+// key value store. Each key/value pair is stored on its own line and
+// separated by the first '=' on the line.
+
+#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_SIMPLE_KEY_VALUE_STORE_H__
+#define CHROMEOS_PLATFORM_UPDATE_ENGINE_SIMPLE_KEY_VALUE_STORE_H__
+
+#include <map>
+#include <string>
+
+namespace chromeos_update_engine {
+namespace simple_key_value_store {
+
+// Parses a string.
+std::map<std::string, std::string> ParseString(const std::string& str);
+
+std::string AssembleString(const std::map<std::string, std::string>& data);
+
+} // namespace simple_key_value_store
+} // namespace chromeos_update_engine
+
+#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_SIMPLE_KEY_VALUE_STORE_H__

Powered by Google App Engine
This is Rietveld 408576698