Index: content/public/android/java/src/org/chromium/content/common/TraceEvent.java |
diff --git a/content/public/android/java/src/org/chromium/content/common/TraceEvent.java b/content/public/android/java/src/org/chromium/content/common/TraceEvent.java |
index 458db8bfb1be63edb402c1f641be065f304d9903..d4635a886a6fb396c9ca8bd968090eca9866ae13 100644 |
--- a/content/public/android/java/src/org/chromium/content/common/TraceEvent.java |
+++ b/content/public/android/java/src/org/chromium/content/common/TraceEvent.java |
@@ -73,6 +73,50 @@ public class TraceEvent { |
} |
/** |
+ * Convenience wrapper around the versions of startAsync() that take string parameters. |
+ * @see #begin() |
+ */ |
+ public static void startAsync(long id) { |
+ if (sEnabled) { |
Ted C
2012/10/11 23:46:30
I would make these all one liners
David Trainor- moved to gerrit
2012/10/12 00:10:49
Done.
|
+ nativeStartAsync(getCallerName(), id, null); |
+ } |
+ } |
+ |
+ public static void startAsync(String name, long id) { |
Ted C
2012/10/11 23:46:30
no javadocs?
David Trainor- moved to gerrit
2012/10/12 00:10:49
Done.
|
+ if (sEnabled) { |
+ nativeStartAsync(name, id, null); |
+ } |
+ } |
+ |
+ public static void startAsync(String name, long id, String arg) { |
+ if (sEnabled) { |
+ nativeStartAsync(name, id, arg); |
+ } |
+ } |
+ |
+ /** |
+ * Convenience wrapper around the versions of finishAsync() that take string parameters. |
+ * @see #finish() |
+ */ |
+ public static void finishAsync(long id) { |
+ if (sEnabled) { |
+ nativeFinishAsync(getCallerName(), id, null); |
+ } |
+ } |
+ |
+ public static void finishAsync(String name, long id) { |
+ if (sEnabled) { |
+ nativeFinishAsync(name, id, null); |
+ } |
+ } |
+ |
+ public static void finishAsync(String name, long id, String arg) { |
+ if (sEnabled) { |
+ nativeFinishAsync(name, id, arg); |
+ } |
+ } |
+ |
+ /** |
* Convenience wrapper around the versions of begin() that take string parameters. |
* The name of the event will be derived from the class and function name that call this. |
* IMPORTANT: if using this version, ensure end() (no parameters) is always called from the |
@@ -137,4 +181,6 @@ public class TraceEvent { |
private static native void nativeInstant(String name, String arg); |
private static native void nativeBegin(String name, String arg); |
private static native void nativeEnd(String name, String arg); |
+ private static native void nativeStartAsync(String name, long id, String arg); |
+ private static native void nativeFinishAsync(String name, long id, String arg); |
} |