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

Unified Diff: pkg/analyzer/lib/file_system/memory_file_system.dart

Issue 1612393002: fix embedder on Windows - fixes #25498 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | pkg/analyzer/test/source/embedder_test.dart » ('j') | pkg/analyzer/test/utils.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/file_system/memory_file_system.dart
diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
index dc676bba812cec7a08264d13cf8fcb10b2c5a085..1066a9d8c2c31b16415e3bba7a3b19e26ce0361d 100644
--- a/pkg/analyzer/lib/file_system/memory_file_system.dart
+++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -28,11 +28,15 @@ class MemoryResourceProvider implements ResourceProvider {
new HashMap<String, List<StreamController<WatchEvent>>>();
int nextStamp = 0;
- final AbsolutePathContext absolutePathContext =
- new AbsolutePathContext(false);
+ final Context _pathContext;
+ final AbsolutePathContext absolutePathContext;
+
+ MemoryResourceProvider({bool isWindows: false})
+ : _pathContext = isWindows ? windows : posix,
+ absolutePathContext = new AbsolutePathContext(isWindows);
@override
- Context get pathContext => posix;
+ Context get pathContext => _pathContext;
/**
* Delete the file with the given path.
« no previous file with comments | « no previous file | pkg/analyzer/test/source/embedder_test.dart » ('j') | pkg/analyzer/test/utils.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698