Add caller param to SelectFileDialog::SelectFile()

Adds a new optional parameter to `SelectFileDialog::SelectFile()` and
`SelectFileImpl()` to pass information about the caller, in particular,
the URL where applicable, to specific implementations.

This is needed in order to support better integration of the files app
on CrOS (which is one type of `SelectFileDialog`) with the Data Leak
Prevention (DLP) restrictions, as described in go/files-dlp-metadata.

Bug: 1364565
Change-Id: I3bf97ec8abb0121d101f6e5cd73c7fc5d6d6909d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3909173
Reviewed-by: Eric Seckler <[email protected]>
Commit-Queue: Aida Zolic <[email protected]>
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1052956}
diff --git a/ui/shell_dialogs/select_file_dialog_linux.h b/ui/shell_dialogs/select_file_dialog_linux.h
index ecde66d..20ad001 100644
--- a/ui/shell_dialogs/select_file_dialog_linux.h
+++ b/ui/shell_dialogs/select_file_dialog_linux.h
@@ -47,7 +47,8 @@
                       int file_type_index,
                       const base::FilePath::StringType& default_extension,
                       gfx::NativeWindow owning_window,
-                      void* params) override = 0;
+                      void* params,
+                      const GURL* caller) override = 0;
 
   // Wrapper for base::DirectoryExists() that allow access on the UI
   // thread. Use this only in the file dialog functions, where it's ok