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

Unified Diff: utils/pub/oauth2.dart

Issue 12255016: Get rid of old redundant methods in io.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise and update to latest. Created 7 years, 10 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 | « utils/pub/io.dart ('k') | utils/pub/package.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/oauth2.dart
diff --git a/utils/pub/oauth2.dart b/utils/pub/oauth2.dart
index 97114523b1e8f30fa1e7ec0ac939a1e443a864cd..3ea33cc1d0d9a2f755465229c82031bfd7942c76 100644
--- a/utils/pub/oauth2.dart
+++ b/utils/pub/oauth2.dart
@@ -10,6 +10,8 @@ import 'dart:uri';
// TODO(nweiz): Make this a "package:" URL, or something nicer than this.
import '../../pkg/oauth2/lib/oauth2.dart';
+import '../../pkg/path/lib/path.dart' as path;
+
import 'http.dart';
import 'io.dart';
import 'log.dart' as log;
@@ -138,9 +140,9 @@ Credentials _loadCredentials(SystemCache cache) {
void _saveCredentials(SystemCache cache, Credentials credentials) {
log.fine('Saving OAuth2 credentials.');
_credentials = credentials;
- var path = _credentialsFile(cache);
- ensureDir(dirname(path));
- writeTextFile(path, credentials.toJson(), dontLogContents: true);
+ var credentialsPath = _credentialsFile(cache);
+ ensureDir(path.dirname(credentialsPath));
+ writeTextFile(credentialsPath, credentials.toJson(), dontLogContents: true);
}
/// The path to the file in which the user's OAuth2 credentials are stored.
« no previous file with comments | « utils/pub/io.dart ('k') | utils/pub/package.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698