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

Unified Diff: tools/gardening/lib/src/cache.dart

Issue 2912343002: Add BuildBotClient to abstract http/logdog access (Closed)
Patch Set: Created 3 years, 7 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 | « tools/gardening/lib/src/buildbot_structures.dart ('k') | tools/gardening/lib/src/client.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gardening/lib/src/cache.dart
diff --git a/tools/gardening/lib/src/cache.dart b/tools/gardening/lib/src/cache.dart
index 4dfac0128c5d714420b40bd549e2b68867862470..e9878bc0456624e1de82d9a66f3b93a2744f087a 100644
--- a/tools/gardening/lib/src/cache.dart
+++ b/tools/gardening/lib/src/cache.dart
@@ -23,6 +23,9 @@ class Cache {
log('Found $path in memory cache');
return memoryCache[path];
}
+ if (base == null) {
+ return ifAbsent();
+ }
File file = new File.fromUri(base.resolve(path));
String text;
if (file.existsSync()) {
@@ -39,6 +42,7 @@ class Cache {
/// Store [text] as the cache data for [path].
void write(String path, String text) {
+ if (base == null) return;
log('Creating $path in file cache');
File file = new File.fromUri(base.resolve(path));
file.createSync(recursive: true);
« no previous file with comments | « tools/gardening/lib/src/buildbot_structures.dart ('k') | tools/gardening/lib/src/client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698