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

Unified Diff: runtime/vm/service.cc

Issue 237683004: Disable applyAuthorStyles (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 045dbe45b8ace845c2ac78ac8302b153a966901c..39440c34213d1f21932860ae69f3f991d7df6967 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -1444,15 +1444,24 @@ static bool HandleProfile(Isolate* isolate, JSONStream* js) {
// TODO(johnmccutchan): Add sub command to trigger full code dump.
bool full_profile = false;
const char* tags_option = js->LookupOption("tags");
- bool use_tags = true;
- if (tags_option != NULL) {
- if (strcmp("hide", tags_option) != 0) {
+ Profiler::TagOrder tag_order = Profiler::kUserVM;
+ if (js->HasOption("tags")) {
+ if (js->OptionIs("tags", "hide")) {
+ tag_order = Profiler::kNoTags;
+ } else if (js->OptionIs("tags", "uv")) {
+ tag_order = Profiler::kUserVM;
+ } else if (js->OptionIs("tags", "u")) {
+ tag_order = Profiler::kUser;
+ } else if (js->OptionIs("tags", "vu")) {
+ tag_order = Profiler::kVMUser;
+ } else if (js->OptionIs("tags", "v")) {
+ tag_order = Profiler::kVM;
+ } else {
PrintError(js, "Invalid tags option value: %s\n", tags_option);
return true;
}
- use_tags = false;
}
- Profiler::PrintToJSONStream(isolate, js, full_profile, use_tags);
+ Profiler::PrintToJSONStream(isolate, js, full_profile, tag_order);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698