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

Unified Diff: utilities.h

Issue 6592070: cromo: Add ExtractUint32 function (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cromo.git@master
Patch Set: undo added include Created 9 years, 10 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 | « no previous file | utilities.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utilities.h
diff --git a/utilities.h b/utilities.h
index 29d386e6900f6aa8c2a67692447d7625b50e4d29..da1c85eb955bb7860c154c286e65af8fb5ecce8b 100644
--- a/utilities.h
+++ b/utilities.h
@@ -28,6 +28,17 @@ const char *ExtractString(const DBusPropertyMap properties,
const char *not_found_response,
DBus::Error &error);
+// Extracts the key from proprties, returning not_found_response if
+// the key is not found. If key is found, but is not a Uint32, sets
+// error and returns not_found_response. If error.is_set() is true,
+// ExtractUint32 will not report further errors. You can make
+// multiple ExtractUint32 calls and check error at the end.
+uint32_t ExtractUint32(const DBusPropertyMap properties,
+ const char *key,
+ uint32_t not_found_response,
+ DBus::Error &error);
+
+
// Convert a string representing a hex ESN to one representing a
// decimal ESN. Returns success.
bool HexEsnToDecimal(const std::string &esn_hex, std::string *out);
« no previous file with comments | « no previous file | utilities.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698