Switch pkg packages, pub, and dartdoc to use package: imports.

This also changes the SDK layout by replacing the "pkg" directory, which
contained the full source of all the packages needed by pub and dartdoc, with a
"packages" directory that contains only their lib directories. This directory is
used as the package root for pub and dartdoc when run from the SDK.

BUG=6745

Review URL: https://codereview.chromium.org//12782016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20640 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/lib/src/authorization_code_grant.dart b/lib/src/authorization_code_grant.dart
index 342c726..900dfc5 100644
--- a/lib/src/authorization_code_grant.dart
+++ b/lib/src/authorization_code_grant.dart
@@ -7,8 +7,7 @@
 import 'dart:async';
 import 'dart:uri';
 
-// TODO(nweiz): This should be a "package:" import. See issue 6745.
-import '../../../../pkg/http/lib/http.dart' as http;
+import 'package:http/http.dart' as http;
 
 import 'client.dart';
 import 'authorization_exception.dart';
diff --git a/lib/src/client.dart b/lib/src/client.dart
index 6d4d042..afb59e4 100644
--- a/lib/src/client.dart
+++ b/lib/src/client.dart
@@ -7,7 +7,7 @@
 import 'dart:async';
 import 'dart:uri';
 
-import '../../../../pkg/http/lib/http.dart' as http;
+import 'package:http/http.dart' as http;
 
 import 'authorization_exception.dart';
 import 'credentials.dart';
diff --git a/lib/src/credentials.dart b/lib/src/credentials.dart
index bd9ab04..420dc49 100644
--- a/lib/src/credentials.dart
+++ b/lib/src/credentials.dart
@@ -8,7 +8,8 @@
 import 'dart:json' as JSON;
 import 'dart:uri';
 
-import '../../../../pkg/http/lib/http.dart' as http;
+import 'package:http/http.dart' as http;
+
 import 'handle_access_token_response.dart';
 import 'utils.dart';
 
diff --git a/lib/src/handle_access_token_response.dart b/lib/src/handle_access_token_response.dart
index 9f9e867..65e706e 100644
--- a/lib/src/handle_access_token_response.dart
+++ b/lib/src/handle_access_token_response.dart
@@ -8,7 +8,7 @@
 import 'dart:json' as JSON;
 import 'dart:uri';
 
-import '../../../../pkg/http/lib/http.dart' as http;
+import 'package:http/http.dart' as http;
 
 import 'credentials.dart';
 import 'authorization_exception.dart';
diff --git a/test/authorization_code_grant_test.dart b/test/authorization_code_grant_test.dart
index ad784a5..85c055b 100644
--- a/test/authorization_code_grant_test.dart
+++ b/test/authorization_code_grant_test.dart
@@ -9,10 +9,11 @@
 import 'dart:json' as JSON;
 import 'dart:uri';
 
-import '../../../pkg/unittest/lib/unittest.dart';
-import '../../../pkg/http/lib/http.dart' as http;
-import '../../../pkg/http/lib/testing.dart';
-import '../lib/oauth2.dart' as oauth2;
+import 'package:unittest/unittest.dart';
+import 'package:http/http.dart' as http;
+import 'package:http/testing.dart';
+import 'package:oauth2/oauth2.dart' as oauth2;
+
 import 'utils.dart';
 
 final redirectUrl = Uri.parse('http://example.com/redirect');
diff --git a/test/client_test.dart b/test/client_test.dart
index a815a22..7049122 100644
--- a/test/client_test.dart
+++ b/test/client_test.dart
@@ -9,9 +9,10 @@
 import 'dart:json' as JSON;
 import 'dart:uri';
 
-import '../../../pkg/unittest/lib/unittest.dart';
-import '../../../pkg/http/lib/http.dart' as http;
-import '../lib/oauth2.dart' as oauth2;
+import 'package:http/http.dart' as http;
+import 'package:oauth2/oauth2.dart' as oauth2;
+import 'package:unittest/unittest.dart';
+
 import 'utils.dart';
 
 final Uri requestUri = Uri.parse("http://example.com/resource");
diff --git a/test/credentials_test.dart b/test/credentials_test.dart
index e21b301..8e40a4a 100644
--- a/test/credentials_test.dart
+++ b/test/credentials_test.dart
@@ -9,9 +9,10 @@
 import 'dart:json' as JSON;
 import 'dart:uri';
 
-import '../../../pkg/unittest/lib/unittest.dart';
-import '../../../pkg/http/lib/http.dart' as http;
-import '../lib/oauth2.dart' as oauth2;
+import 'package:http/http.dart' as http;
+import 'package:oauth2/oauth2.dart' as oauth2;
+import 'package:unittest/unittest.dart';
+
 import 'utils.dart';
 
 final Uri tokenEndpoint = Uri.parse('http://example.com/token');
diff --git a/test/handle_access_token_response_test.dart b/test/handle_access_token_response_test.dart
index e39ee56..772f263 100644
--- a/test/handle_access_token_response_test.dart
+++ b/test/handle_access_token_response_test.dart
@@ -8,10 +8,11 @@
 import 'dart:json' as JSON;
 import 'dart:uri';
 
-import '../../../pkg/unittest/lib/unittest.dart';
-import '../../../pkg/http/lib/http.dart' as http;
-import '../lib/oauth2.dart' as oauth2;
-import '../lib/src/handle_access_token_response.dart';
+import 'package:http/http.dart' as http;
+import 'package:oauth2/oauth2.dart' as oauth2;
+import 'package:oauth2/src/handle_access_token_response.dart';
+import 'package:unittest/unittest.dart';
+
 import 'utils.dart';
 
 final Uri tokenEndpoint = Uri.parse("https://example.com/token");
diff --git a/test/utils.dart b/test/utils.dart
index 04b194e..b874cc4 100644
--- a/test/utils.dart
+++ b/test/utils.dart
@@ -7,10 +7,10 @@
 import 'dart:async';
 import 'dart:collection' show Queue;
 
-import '../../../pkg/unittest/lib/unittest.dart';
-import '../../../pkg/http/lib/http.dart' as http;
-import '../../../pkg/http/lib/testing.dart';
-import '../lib/oauth2.dart' as oauth2;
+import 'package:http/http.dart' as http;
+import 'package:http/testing.dart';
+import 'package:oauth2/oauth2.dart' as oauth2;
+import 'package:unittest/unittest.dart';
 
 class ExpectClient extends MockClient {
   final Queue<MockClientHandler> _handlers;
diff --git a/test/utils_test.dart b/test/utils_test.dart
index 2fa4b73..145e99b 100644
--- a/test/utils_test.dart
+++ b/test/utils_test.dart
@@ -4,9 +4,8 @@
 
 library utils_test;
 
-import '../../../pkg/unittest/lib/unittest.dart';
-import '../lib/src/utils.dart';
-
+import 'package:oauth2/src/utils.dart';
+import 'package:unittest/unittest.dart';
 
 void main() {
   group('AuthenticateHeader', () {