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

Side by Side Diff: utils/pub/hosted_source.dart

Issue 12782016: Switch pkg packages, pub, and dartdoc to use package: imports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « utils/pub/git_source.dart ('k') | utils/pub/http.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library hosted_source; 5 library hosted_source;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io' as io; 8 import 'dart:io' as io;
9 import 'dart:json' as json; 9 import 'dart:json' as json;
10 import 'dart:uri'; 10 import 'dart:uri';
11 11
12 // TODO(nweiz): Make this import better. 12 import 'package:http/http.dart' as http;
13 import '../../pkg/http/lib/http.dart' as http; 13 import 'package:pathos/path.dart' as path;
14 import '../../pkg/pathos/lib/path.dart' as path;
15 14
16 import 'http.dart'; 15 import 'http.dart';
17 import 'io.dart'; 16 import 'io.dart';
18 import 'log.dart' as log; 17 import 'log.dart' as log;
19 import 'package.dart'; 18 import 'package.dart';
20 import 'pubspec.dart'; 19 import 'pubspec.dart';
21 import 'source.dart'; 20 import 'source.dart';
22 import 'source_registry.dart'; 21 import 'source_registry.dart';
23 import 'utils.dart'; 22 import 'utils.dart';
24 import 'version.dart'; 23 import 'version.dart';
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 } 204 }
206 205
207 var name = description["name"]; 206 var name = description["name"];
208 if (name is! String) { 207 if (name is! String) {
209 throw new FormatException("The 'name' key must have a string value."); 208 throw new FormatException("The 'name' key must have a string value.");
210 } 209 }
211 210
212 var url = description.containsKey("url") ? description["url"] : _defaultUrl; 211 var url = description.containsKey("url") ? description["url"] : _defaultUrl;
213 return new Pair<String, String>(name, url); 212 return new Pair<String, String>(name, url);
214 } 213 }
OLDNEW
« no previous file with comments | « utils/pub/git_source.dart ('k') | utils/pub/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698