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

Unified Diff: pkg/oauth2/lib/src/client.dart

Issue 11308111: Refactor http.Client and http.BaseClient to allow http.Client in type annotations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Small fix Created 8 years, 1 month 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/oauth2/lib/src/authorization_code_grant.dart ('k') | pkg/oauth2/lib/src/credentials.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/oauth2/lib/src/client.dart
diff --git a/pkg/oauth2/lib/src/client.dart b/pkg/oauth2/lib/src/client.dart
index dc71e404716e3b527a660c908d7c91139f6c2335..7322afac4dce96aab6dd601ab268baee0f9ffa93 100644
--- a/pkg/oauth2/lib/src/client.dart
+++ b/pkg/oauth2/lib/src/client.dart
@@ -14,9 +14,8 @@ import 'utils.dart';
// TODO(nweiz): Add an onCredentialsRefreshed event once we have some event
// infrastructure.
-/// An OAuth2 client. This acts as a drop-in replacement for an
-/// [http.BaseClient], while sending OAuth2 authorization credentials along with
-/// each request.
+/// An OAuth2 client. This acts as a drop-in replacement for an [http.Client],
+/// while sending OAuth2 authorization credentials along with each request.
///
/// The client also automatically refreshes its credentials if possible. When it
/// makes a request, if its credentials are expired, it will first refresh them.
@@ -62,7 +61,7 @@ class Client extends http.BaseClient {
Credentials _credentials;
/// The underlying HTTP client.
- http.BaseClient _httpClient;
+ http.Client _httpClient;
/// Creates a new client from a pre-existing set of credentials. When
/// authorizing a client for the first time, you should use
@@ -74,7 +73,7 @@ class Client extends http.BaseClient {
this.identifier,
this.secret,
this._credentials,
- {http.BaseClient httpClient})
+ {http.Client httpClient})
: _httpClient = httpClient == null ? new http.Client() : httpClient;
/// Sends an HTTP request with OAuth2 authorization credentials attached. This
« no previous file with comments | « pkg/oauth2/lib/src/authorization_code_grant.dart ('k') | pkg/oauth2/lib/src/credentials.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698