disabled_usage.dart 1.02 KB
Newer Older
1 2 3 4
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
part of reporting;
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

class DisabledUsage implements Usage {
  @override
  bool get isFirstRun => false;

  @override
  bool get suppressAnalytics => true;

  @override
  set suppressAnalytics(bool value) { }

  @override
  bool get enabled => false;

  @override
  set enabled(bool value) { }

  @override
  String get clientId => null;

  @override
  void sendCommand(String command, { Map<String, String> parameters }) { }

  @override
  void sendEvent(String category, String parameter, { Map<String, String> parameters }) { }

  @override
  void sendTiming(String category, String variableName, Duration duration, { String label }) { }

  @override
36
  void sendException(dynamic exception) { }
37 38 39 40 41

  @override
  Stream<Map<String, dynamic>> get onSend => null;

  @override
42
  Future<void> ensureAnalyticsSent() => Future<void>.value();
43 44 45 46

  @override
  void printWelcome() { }
}