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

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/web_socket_api.dart

Issue 205713007: Add helper getters for URIs and date/times to json_rpc_2. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: bump the version Created 6 years, 9 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 | « pkg/json_rpc_2/test/server/parameters_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/barback/web_socket_api.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/web_socket_api.dart b/sdk/lib/_internal/pub/lib/src/barback/web_socket_api.dart
index 98f74b880b33f2e95a8b2473d2cecf3a26012ec8..35be3c3953c537ed5d304d375bbd796647dd74d7 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/web_socket_api.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/web_socket_api.dart
@@ -90,15 +90,7 @@ class WebSocketApi {
/// This does *not* currently check to ensure the asset actually exists. It
/// only maps what the corresponding asset *should* be for that URL.
Map _urlToAssetId(json_rpc.Parameters params) {
- // TODO(nweiz): Use [params.asUrl] when issue 17700 is fixed.
- var urlString = params["url"].asString;
- var url;
- try {
- url = Uri.parse(urlString);
- } on FormatException catch (ex) {
- throw new json_rpc.RpcException.invalidParams(
- '"$urlString" is not a valid URL.');
- }
+ var url = params["url"].asUrl;
// If a line number was given, map it to the output line.
var line = params["line"].asIntOr(null);
« no previous file with comments | « pkg/json_rpc_2/test/server/parameters_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698