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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/DartUIStartup.java

Issue 14322008: Version 0.4.7.3 . (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 7 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: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/DartUIStartup.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/DartUIStartup.java (revision 21601)
+++ editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/DartUIStartup.java (working copy)
@@ -38,6 +38,8 @@
import org.eclipse.ui.IStartup;
import org.eclipse.ui.PlatformUI;
+import java.io.File;
+
/**
* This early startup class is called after the main workbench window opens, and is used to warm up
* various bits of compiler infrastructure.
@@ -211,6 +213,8 @@
}
}
+ private static final String DART_INSTRUMENTATION_FLAGS_FILE_NAME = "dart_instrumentation_flags.txt";
+
private static StartupJob startupJob;
private static final Object startupSync = new Object();
@@ -262,6 +266,17 @@
}
}
+ /**
+ * Determine if the {@value #DART_INSTRUMENTATION_FLAGS_FILE_NAME} file exists in the user's dart
+ * directory.
+ *
+ * @return {@code true} if the file exists, else false
+ */
+ private boolean IsInstrumentationFlagFilePresent() {
+ File dartDir = new File(DartCore.getUserDefaultDartFolder());
+ return new File(dartDir, DART_INSTRUMENTATION_FLAGS_FILE_NAME).exists();
+ }
+
private void reportDartCoreDebug() {
InstrumentationBuilder instrumentation = Instrumentation.builder("DartUIStartup.reportDartCoreDebug");
try {
@@ -282,6 +297,7 @@
instrumentation.metric("Version", DartCore.getVersion());
instrumentation.metric("SDKVersion", DartSdkManager.getManager().getSdk().getSdkVersion());
instrumentation.metric("OSVersion", FeedbackUtils.getOSName());
+ instrumentation.metric("IsInstrumentationFlagFilePresent", IsInstrumentationFlagFilePresent());
} finally {
instrumentation.log();
}

Powered by Google App Engine
This is Rietveld 408576698