Rename network::URLLoaderStatus to network::URLLoaderCompletionStatus

URLLoaderStatus is used in URLLoaderClient::OnComplete to notify
the loader's completion status. In comparison with other types used
in other callback arguments in URLLoaderClient, the name "URLLoaderStatus"
is too generic, and does not explain what it actually represents.

This patch renames it to URLLoaderCompletionStatus. Since the native
struct was named as ResourceRequestCompletionStatus, it should sound
reasonable.

Bug: 736308
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: Ic6aea2a31fab18f102d2f7f56183eaa016e07583
Reviewed-on: https://chromium-review.googlesource.com/776016
Commit-Queue: Takashi Toyoshima <[email protected]>
Reviewed-by: Mike West <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Cr-Commit-Position: refs/heads/master@{#517794}
diff --git a/content/browser/file_url_loader_factory.cc b/content/browser/file_url_loader_factory.cc
index 9ff24ac..28b6cd8 100644
--- a/content/browser/file_url_loader_factory.cc
+++ b/content/browser/file_url_loader_factory.cc
@@ -122,25 +122,27 @@
     client.Bind(std::move(client_info));
 
     if (!net::FileURLToFilePath(request.url, &path_)) {
-      client->OnComplete(network::URLLoaderStatus(net::ERR_FAILED));
+      client->OnComplete(network::URLLoaderCompletionStatus(net::ERR_FAILED));
       return;
     }
 
     base::File::Info info;
     if (!base::GetFileInfo(path_, &info) || !info.is_directory) {
-      client->OnComplete(network::URLLoaderStatus(net::ERR_FILE_NOT_FOUND));
+      client->OnComplete(
+          network::URLLoaderCompletionStatus(net::ERR_FILE_NOT_FOUND));
       return;
     }
 
     if (!GetContentClient()->browser()->IsFileAccessAllowed(
             path_, base::MakeAbsoluteFilePath(path_), profile_path)) {
-      client->OnComplete(network::URLLoaderStatus(net::ERR_ACCESS_DENIED));
+      client->OnComplete(
+          network::URLLoaderCompletionStatus(net::ERR_ACCESS_DENIED));
       return;
     }
 
     mojo::DataPipe pipe(kDefaultFileUrlPipeSize);
     if (!pipe.consumer_handle.is_valid()) {
-      client->OnComplete(network::URLLoaderStatus(net::ERR_FAILED));
+      client->OnComplete(network::URLLoaderCompletionStatus(net::ERR_FAILED));
       return;
     }
 
@@ -253,7 +255,7 @@
       completion_status = net::ERR_FAILED;
     }
 
-    client_->OnComplete(network::URLLoaderStatus(completion_status));
+    client_->OnComplete(network::URLLoaderCompletionStatus(completion_status));
     client_.reset();
     MaybeDeleteSelf();
   }
@@ -321,19 +323,21 @@
 
     base::FilePath path;
     if (!net::FileURLToFilePath(request.url, &path)) {
-      client->OnComplete(network::URLLoaderStatus(net::ERR_FAILED));
+      client->OnComplete(network::URLLoaderCompletionStatus(net::ERR_FAILED));
       return;
     }
 
     base::File::Info info;
     if (!base::GetFileInfo(path, &info)) {
-      client->OnComplete(network::URLLoaderStatus(net::ERR_FILE_NOT_FOUND));
+      client->OnComplete(
+          network::URLLoaderCompletionStatus(net::ERR_FILE_NOT_FOUND));
       return;
     }
 
     if (info.is_directory) {
       if (directory_loading_policy == DirectoryLoadingPolicy::kFail) {
-        client->OnComplete(network::URLLoaderStatus(net::ERR_FILE_NOT_FOUND));
+        client->OnComplete(
+            network::URLLoaderCompletionStatus(net::ERR_FILE_NOT_FOUND));
         return;
       }
 
@@ -393,13 +397,14 @@
     if (file_access_policy == FileAccessPolicy::kRestricted &&
         !GetContentClient()->browser()->IsFileAccessAllowed(
             path, base::MakeAbsoluteFilePath(path), profile_path)) {
-      client->OnComplete(network::URLLoaderStatus(net::ERR_ACCESS_DENIED));
+      client->OnComplete(
+          network::URLLoaderCompletionStatus(net::ERR_ACCESS_DENIED));
       return;
     }
 
     mojo::DataPipe pipe(kDefaultFileUrlPipeSize);
     if (!pipe.consumer_handle.is_valid()) {
-      client->OnComplete(network::URLLoaderStatus(net::ERR_FAILED));
+      client->OnComplete(network::URLLoaderCompletionStatus(net::ERR_FAILED));
       return;
     }
 
@@ -414,7 +419,7 @@
     int initial_read_result =
         file.ReadAtCurrentPos(initial_read_buffer, net::kMaxBytesToSniff);
     if (initial_read_result < 0) {
-      client->OnComplete(network::URLLoaderStatus(net::ERR_FAILED));
+      client->OnComplete(network::URLLoaderCompletionStatus(net::ERR_FAILED));
       return;
     }
     size_t initial_read_size = static_cast<size_t>(initial_read_result);
@@ -436,8 +441,8 @@
       }
 
       if (fail) {
-        client->OnComplete(
-            network::URLLoaderStatus(net::ERR_REQUEST_RANGE_NOT_SATISFIABLE));
+        client->OnComplete(network::URLLoaderCompletionStatus(
+            net::ERR_REQUEST_RANGE_NOT_SATISFIABLE));
         return;
       }
     }
@@ -513,9 +518,9 @@
 
   void OnFileWritten(MojoResult result) {
     if (result == MOJO_RESULT_OK)
-      client_->OnComplete(network::URLLoaderStatus(net::OK));
+      client_->OnComplete(network::URLLoaderCompletionStatus(net::OK));
     else
-      client_->OnComplete(network::URLLoaderStatus(net::ERR_FAILED));
+      client_->OnComplete(network::URLLoaderCompletionStatus(net::ERR_FAILED));
     client_.reset();
     MaybeDeleteSelf();
   }