Index: chrome/browser/chromeos/drive/drive_file_system_util.cc |
diff --git a/chrome/browser/chromeos/drive/drive_file_system_util.cc b/chrome/browser/chromeos/drive/drive_file_system_util.cc |
index 0c8989d50d0a50803d5f9a6416ae9a202d85d879..d390f718a088769e005086d429b114ed9e16dddd 100644 |
--- a/chrome/browser/chromeos/drive/drive_file_system_util.cc |
+++ b/chrome/browser/chromeos/drive/drive_file_system_util.cc |
@@ -33,6 +33,7 @@ |
#include "content/public/browser/browser_thread.h" |
#include "net/base/escape.h" |
#include "net/base/network_change_notifier.h" |
+#include "webkit/fileapi/file_system_url.h" |
using content::BrowserThread; |
@@ -278,6 +279,13 @@ base::FilePath ExtractDrivePath(const base::FilePath& path) { |
return extracted; |
} |
+base::FilePath ExtractDrivePathFromFileSystemUrl( |
+ const fileapi::FileSystemURL& url) { |
+ if (!url.is_valid() || url.type() != fileapi::kFileSystemTypeDrive) |
+ return base::FilePath(); |
+ return ExtractDrivePath(url.path()); |
+} |
+ |
std::string EscapeCacheFileName(const std::string& filename) { |
// This is based on net/base/escape.cc: net::(anonymous namespace)::Escape |
std::string escaped; |