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

Unified Diff: runtime/vm/json_stream.cc

Issue 217323006: Redo allocationprofile options (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | « runtime/vm/json_stream.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/json_stream.cc
diff --git a/runtime/vm/json_stream.cc b/runtime/vm/json_stream.cc
index 4962f0317b4365cd9abe13b7f6618925a0e86fbd..fe556036b72907c173d0d928e9cfb5369611756f 100644
--- a/runtime/vm/json_stream.cc
+++ b/runtime/vm/json_stream.cc
@@ -139,6 +139,20 @@ const char* JSONStream::LookupOption(const char* key) const {
}
+bool JSONStream::HasOption(const char* key) const {
+ ASSERT(key);
+ return LookupOption(key) != NULL;
+}
+
+
+bool JSONStream::OptionIs(const char* key, const char* value) const {
+ ASSERT(key);
+ ASSERT(value);
+ const char* key_value = LookupOption(key);
+ return (key_value != NULL) && (strcmp(key_value, value) == 0);
+}
turnidge 2014/04/01 20:23:28 Consider adding a heartbeat unit test for these tw
Cutch 2014/04/01 22:01:14 Added a test for options and arguments in JSONStre
+
+
void JSONStream::Clear() {
buffer_.Clear();
open_objects_ = 0;
« no previous file with comments | « runtime/vm/json_stream.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698