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

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

Issue 2324463006: Clean up warnings and hints (Closed)
Patch Set: Created 4 years, 3 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
Index: pkg/analyzer/lib/file_system/physical_file_system.dart
diff --git a/pkg/analyzer/lib/file_system/physical_file_system.dart b/pkg/analyzer/lib/file_system/physical_file_system.dart
index ad430c0e7611d56a224bd47ae7e45778b9ea0b3e..d3d73c42b2a13f2dc3c8d0cef94cbcf63ebbf3ba 100644
--- a/pkg/analyzer/lib/file_system/physical_file_system.dart
+++ b/pkg/analyzer/lib/file_system/physical_file_system.dart
@@ -5,7 +5,7 @@
library analyzer.file_system.physical_file_system;
import 'dart:async';
-import 'dart:core' hide Resource;
+import 'dart:core';
import 'dart:io' as io;
import 'package:analyzer/file_system/file_system.dart';
@@ -40,10 +40,17 @@ List<int> _pathsToTimes(List<String> paths) {
}
/**
+ * A function that can translate the contents of files on disk as they are read.
+ * This is now obsolete, but supported the ability of server to deal with
+ * clients that convert all text to an internal format.
+ */
+typedef String FileReadMode(String s);
scheglov 2016/09/09 15:56:49 Should this type be used also in FileSource and Fi
Brian Wilkerson 2016/09/09 16:09:35 I moved the typdef to source_resource.dart and use
+
+/**
* A `dart:io` based implementation of [ResourceProvider].
*/
class PhysicalResourceProvider implements ResourceProvider {
- static final NORMALIZE_EOL_ALWAYS =
+ static final FileReadMode NORMALIZE_EOL_ALWAYS =
(String string) => string.replaceAll(new RegExp('\r\n?'), '\n');
static final PhysicalResourceProvider INSTANCE =
@@ -62,7 +69,7 @@ class PhysicalResourceProvider implements ResourceProvider {
final AbsolutePathContext absolutePathContext =
new AbsolutePathContext(io.Platform.isWindows);
- PhysicalResourceProvider(String fileReadMode(String s)) {
+ PhysicalResourceProvider(FileReadMode fileReadMode) {
if (fileReadMode != null) {
FileBasedSource.fileReadMode = fileReadMode;
}

Powered by Google App Engine
This is Rietveld 408576698