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

Unified Diff: packages/usage/lib/usage_io.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 5 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 | « packages/usage/lib/usage_html.dart ('k') | packages/usage/lib/uuid/uuid.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/usage/lib/usage_io.dart
diff --git a/packages/usage/lib/usage_io.dart b/packages/usage/lib/usage_io.dart
index 5e35e94dbd8bb8daf67ed5d3f40e61c9613218da..61accf7fcb79ad419cef103aaf6c86ba77b7906a 100644
--- a/packages/usage/lib/usage_io.dart
+++ b/packages/usage/lib/usage_io.dart
@@ -2,12 +2,36 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-/// In order to use this library import the `usage_io.dart` file and
-/// instantiate the [AnalyticsIO] class.
-///
-/// You'll need to provide a Google Analytics tracking ID, the application name,
-/// and the application version.
+/**
+ * In order to use this library import the `usage_io.dart` file and
+ * instantiate the [AnalyticsIO] class.
+ *
+ * You'll need to provide a Google Analytics tracking ID, the application name,
+ * and the application version.
+ */
library usage_io;
-export 'src/usage_impl_io.dart' show AnalyticsIO;
+import 'src/usage_impl.dart';
+import 'src/usage_impl_io.dart';
+
export 'usage.dart';
+
+/**
+ * An interface to a Google Analytics session, suitable for use in command-line
+ * applications.
+ *
+ * [analyticsUrl] is an optional replacement for the default Google Analytics
+ * URL (`https://www.google-analytics.com/collect`).
+ */
+class AnalyticsIO extends AnalyticsImpl {
+ AnalyticsIO(String trackingId, String applicationName, String applicationVersion, {
+ String analyticsUrl
+ }) : super(
+ trackingId,
+ new IOPersistentProperties(applicationName),
+ new IOPostHandler(),
+ applicationName: applicationName,
+ applicationVersion: applicationVersion,
+ analyticsUrl: analyticsUrl
+ );
+}
« no previous file with comments | « packages/usage/lib/usage_html.dart ('k') | packages/usage/lib/uuid/uuid.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698