Remove 'allowCached' from FileState.refresh().

We already mark files for reading when add/change/removeFile().

Change-Id: I1d486cc22b78e25424e8001204b10c110eff1b4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 40b742f..b21980f 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -414,12 +414,8 @@
   /// Read the file content and ensure that all of the file properties are
   /// consistent with the read content, including API signature.
   ///
-  /// If [allowCached] is `true`, don't read the content of the file if it
-  /// is already cached (in another [FileSystemState], because otherwise we
-  /// would not create this new instance of [FileState] and refresh it).
-  ///
   /// Return `true` if the API signature changed since the last refresh.
-  bool refresh({bool allowCached = false}) {
+  bool refresh() {
     counterFileStateRefresh++;
 
     var timerWasRunning = timerFileStateRefresh.isRunning;
@@ -429,10 +425,6 @@
 
     _invalidateCurrentUnresolvedData();
 
-    if (!allowCached) {
-      _fsState.markFileForReading(path);
-    }
-
     {
       var rawFileState = _fsState._fileContentCache.get(path);
       _content = rawFileState.content;
@@ -862,7 +854,7 @@
       _uriToFile[uri] = file;
       _addFileWithPath(path, file);
       _pathToCanonicalFile[path] = file;
-      file.refresh(allowCached: true);
+      file.refresh();
     }
     return file;
   }
@@ -908,7 +900,7 @@
           packageLanguageVersion);
       _uriToFile[uri] = file;
       _addFileWithPath(path, file);
-      file.refresh(allowCached: true);
+      file.refresh();
     }
     return Either2.t1(file);
   }