Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / file_manager / filesystem_api_util.cc
index 08c6127..5c6238e 100644 (file)
@@ -24,7 +24,6 @@
 
 namespace file_manager {
 namespace util {
-
 namespace {
 
 // Helper function used to implement GetNonNativeLocalPathMimeType. It extracts
@@ -107,6 +106,18 @@ void PrepareFileOnIOThread(
 
 }  // namespace
 
+bool IsNonNativeFileSystemType(storage::FileSystemType type) {
+  switch (type) {
+    case storage::kFileSystemTypeNativeLocal:
+    case storage::kFileSystemTypeRestrictedNativeLocal:
+      return false;
+    default:
+      // The path indeed corresponds to a mount point not associated with a
+      // native local path.
+      return true;
+  }
+}
+
 bool IsUnderNonNativeLocalPath(Profile* profile,
                         const base::FilePath& path) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -123,15 +134,7 @@ bool IsUnderNonNativeLocalPath(Profile* profile,
   if (!filesystem_url.is_valid())
     return false;
 
-  switch (filesystem_url.type()) {
-    case storage::kFileSystemTypeNativeLocal:
-    case storage::kFileSystemTypeRestrictedNativeLocal:
-      return false;
-    default:
-      // The path indeed corresponds to a mount point not associated with a
-      // native local path.
-      return true;
-  }
+  return IsNonNativeFileSystemType(filesystem_url.type());
 }
 
 void GetNonNativeLocalPathMimeType(