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

Unified Diff: chrome/browser/chromeos/fileapi/file_system_backend.cc

Issue 527773003: Add GetURLForBrowserTab method to the external file system backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handled @kinaba's comments Created 6 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: chrome/browser/chromeos/fileapi/file_system_backend.cc
diff --git a/chrome/browser/chromeos/fileapi/file_system_backend.cc b/chrome/browser/chromeos/fileapi/file_system_backend.cc
index 5866c4721b5a1a21434032b0aee4e43190006240..d7c0c251f3c24fad37042327c856ce7f88b9c05e 100644
--- a/chrome/browser/chromeos/fileapi/file_system_backend.cc
+++ b/chrome/browser/chromeos/fileapi/file_system_backend.cc
@@ -387,4 +387,28 @@ bool FileSystemBackend::GetVirtualPath(
system_mount_points_->GetVirtualPath(filesystem_path, virtual_path);
}
+void FileSystemBackend::GetURLForBrowserTab(
+ const storage::FileSystemURL& url,
+ const URLCallback& callback) {
+ switch (url.type()) {
mtomasz 2014/09/04 05:30:01 I think we should add a DCHECK for url_is_valid(),
hirono 2014/09/04 06:10:59 Done.
+ case storage::kFileSystemTypeDrive:
+ drive_delegate_->GetURLForBrowserTab(url, callback);
+ return;
+ case storage::kFileSystemTypeProvided:
+ file_system_provider_delegate_->GetURLForBrowserTab(url, callback);
+ return;
+ case storage::kFileSystemTypeDeviceMediaAsFileStorage:
+ mtp_delegate_->GetURLForBrowserTab(url, callback);
+ return;
+ case storage::kFileSystemTypeNativeLocal:
+ case storage::kFileSystemTypeRestrictedNativeLocal:
+ callback.Run(GURL());
+ return;
+ default:
+ NOTREACHED();
+ callback.Run(GURL());
+ return;
mtomasz 2014/09/04 05:30:01 In another switch-case statements in this file we
hirono 2014/09/04 06:10:59 Done.
+ }
+}
+
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698