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

Unified Diff: chrome/browser/chromeos/drive/drive_file_system_util.cc

Issue 13767002: Use ExtractDrivePath(path()) instead of virtual_path() for getting Drive path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use GetDriveMountPointPath() Created 7 years, 8 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/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;

Powered by Google App Engine
This is Rietveld 408576698