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

Side by Side Diff: runtime/lib/resource_patch.dart

Issue 2220883004: Use metadata annotation @patch for patch classes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: wip Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 patch class Resource { 5 @patch class Resource {
6 /* patch */ const factory Resource(String uri) = _Resource; 6 /* @patch */ const factory Resource(String uri) = _Resource;
7 } 7 }
8 8
9 class _Resource implements Resource { 9 class _Resource implements Resource {
10 final String _location; 10 final String _location;
11 11
12 const _Resource(this._location); 12 const _Resource(this._location);
13 13
14 Uri get uri => Uri.base.resolve(_location); 14 Uri get uri => Uri.base.resolve(_location);
15 15
16 Stream<List<int>> openRead() { 16 Stream<List<int>> openRead() {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 var str = encoding.decode(bytes); 59 var str = encoding.decode(bytes);
60 completer.complete(str); 60 completer.complete(str);
61 }, 61 },
62 onError: (e, s) { 62 onError: (e, s) {
63 completer.completeError(e,s); 63 completer.completeError(e,s);
64 }); 64 });
65 65
66 return completer.future; 66 return completer.future;
67 } 67 }
68 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698