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

Unified Diff: pkg/analysis_server/lib/src/server/driver.dart

Issue 3003783002: Put the analytics UI behind a flag. (Closed)
Patch Set: Created 3 years, 4 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 | pkg/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/server/driver.dart
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index c5528c48461a17ecb319c7705cbbff385cffee53..11cbfa8956f66aef23783a4f5d2d83190aa186aa 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -320,10 +320,12 @@ class Driver implements ServerStarter {
analysisServerOptions.crashReportSender =
new CrashReportSender('Dart_analysis_server', analytics);
- if (results.wasParsed(ANALYTICS_FLAG)) {
- analytics.enabled = results[ANALYTICS_FLAG];
- print(telemetry.createAnalyticsStatusMessage(analytics.enabled));
- return null;
+ if (telemetry.SHOW_ANALYTICS_UI) {
+ if (results.wasParsed(ANALYTICS_FLAG)) {
+ analytics.enabled = results[ANALYTICS_FLAG];
+ print(telemetry.createAnalyticsStatusMessage(analytics.enabled));
+ return null;
+ }
}
if (results[DARTPAD_OPTION]) {
@@ -495,8 +497,10 @@ class Driver implements ServerStarter {
negatable: false);
parser.addOption(NEW_ANALYSIS_DRIVER_LOG,
help: "set a destination for the new analysis driver's log");
- parser.addFlag(ANALYTICS_FLAG,
- help: 'enable or disable sending analytics information to Google');
+ if (telemetry.SHOW_ANALYTICS_UI) {
+ parser.addFlag(ANALYTICS_FLAG,
+ help: 'enable or disable sending analytics information to Google');
+ }
parser.addFlag(SUPPRESS_ANALYTICS_FLAG,
negatable: false, help: 'suppress analytics for this session');
parser.addOption(PORT_OPTION,
@@ -541,14 +545,16 @@ class Driver implements ServerStarter {
print('Supported flags are:');
print(parser.usage);
- // Print analytics status and information.
- if (fromHelp) {
+ if (telemetry.SHOW_ANALYTICS_UI) {
+ // Print analytics status and information.
+ if (fromHelp) {
+ print('');
+ print(telemetry.analyticsNotice);
+ }
print('');
- print(telemetry.analyticsNotice);
+ print(telemetry.createAnalyticsStatusMessage(analytics.enabled,
+ command: ANALYTICS_FLAG));
}
- print('');
- print(telemetry.createAnalyticsStatusMessage(analytics.enabled,
- command: ANALYTICS_FLAG));
}
/**
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698