| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/fileapi/file_system_util.h" | 5 #include "webkit/fileapi/file_system_util.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 case kFileSystemTypeNativeMedia: | 234 case kFileSystemTypeNativeMedia: |
| 235 return "NativeMedia"; | 235 return "NativeMedia"; |
| 236 case kFileSystemTypeDeviceMedia: | 236 case kFileSystemTypeDeviceMedia: |
| 237 return "DeviceMedia"; | 237 return "DeviceMedia"; |
| 238 case kFileSystemTypeDrive: | 238 case kFileSystemTypeDrive: |
| 239 return "Drive"; | 239 return "Drive"; |
| 240 case kFileSystemTypeSyncable: | 240 case kFileSystemTypeSyncable: |
| 241 return "Syncable"; | 241 return "Syncable"; |
| 242 case kFileSystemTypeNativeForPlatformApp: | 242 case kFileSystemTypeNativeForPlatformApp: |
| 243 return "NativeForPlatformApp"; | 243 return "NativeForPlatformApp"; |
| 244 case kFileSystemInternalTypeEnumStart: |
| 245 case kFileSystemInternalTypeEnumEnd: |
| 246 NOTREACHED(); |
| 247 // Fall through. |
| 244 case kFileSystemTypeUnknown: | 248 case kFileSystemTypeUnknown: |
| 245 return "Unknown"; | 249 return "Unknown"; |
| 246 } | 250 } |
| 247 NOTREACHED(); | 251 NOTREACHED(); |
| 248 return std::string(); | 252 return std::string(); |
| 249 } | 253 } |
| 250 | 254 |
| 251 std::string FilePathToString(const base::FilePath& file_path) { | 255 std::string FilePathToString(const base::FilePath& file_path) { |
| 252 #if defined(OS_WIN) | 256 #if defined(OS_WIN) |
| 253 return UTF16ToUTF8(file_path.value()); | 257 return UTF16ToUTF8(file_path.value()); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 root.append("/"); | 371 root.append("/"); |
| 368 } | 372 } |
| 369 return root; | 373 return root; |
| 370 } | 374 } |
| 371 | 375 |
| 372 bool AreSameFileSystem(const FileSystemURL& url1, const FileSystemURL& url2) { | 376 bool AreSameFileSystem(const FileSystemURL& url1, const FileSystemURL& url2) { |
| 373 return url1.origin() == url2.origin() && url1.type() == url2.type(); | 377 return url1.origin() == url2.origin() && url1.type() == url2.type(); |
| 374 } | 378 } |
| 375 | 379 |
| 376 } // namespace fileapi | 380 } // namespace fileapi |
| OLD | NEW |