Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
|
ahe
2014/09/02 13:44:24
Add line between copyright and library declaration
lukechurch
2014/09/02 19:52:37
Done.
| |
| 4 library microlytics.html_channels; | |
| 5 | |
| 6 import 'dart:html'; | |
| 7 import 'channels.dart'; | |
| 8 | |
| 9 final String _ANALYTICS_URL = "https://www.google-analytics.com/collect"; | |
|
ahe
2014/09/02 13:44:23
Would "//www.google-analytics.com/collect" work he
ahe
2014/09/02 13:44:23
In Dart, constants are "const".
lukechurch
2014/09/02 19:52:37
Does that mandate SSL?
Given that I don't know wh
ahe
2014/09/03 08:51:31
Yes, if the page uses SSL.
lukechurch
2014/09/03 11:27:16
Done.
| |
| 10 | |
| 11 class HttpRequestChannel extends Channel { | |
| 12 void sendData(String data) { | |
| 13 HttpRequest.request(_ANALYTICS_URL, method: "POST", sendData: data) | |
| 14 .then((HttpRequest rest) { } | |
|
ahe
2014/09/02 13:44:23
There is no reason to install a then block when yo
lukechurch
2014/09/02 19:52:37
I thought that there was an issue similar to the o
| |
| 15 ); | |
| 16 } | |
| 17 } | |
| OLD | NEW |