| OLD | NEW | 
|    1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2011 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/file_path.h" |    9 #include "base/file_path.h" | 
|   10 #include "base/logging.h" |   10 #include "base/logging.h" | 
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  155   GURL origin_url(web_security_origin.toString()); |  155   GURL origin_url(web_security_origin.toString()); | 
|  156  |  156  | 
|  157   // We need this work-around for file:/// URIs as |  157   // We need this work-around for file:/// URIs as | 
|  158   // createFromDatabaseIdentifier returns empty origin_url for them. |  158   // createFromDatabaseIdentifier returns empty origin_url for them. | 
|  159   if (origin_url.spec().empty() && |  159   if (origin_url.spec().empty() && | 
|  160       origin_identifier.find("file__") == 0) |  160       origin_identifier.find("file__") == 0) | 
|  161     return GURL("file:///"); |  161     return GURL("file:///"); | 
|  162   return origin_url; |  162   return origin_url; | 
|  163 } |  163 } | 
|  164  |  164  | 
 |  165 std::string GetFileSystemTypeString(FileSystemType type) { | 
 |  166   switch (type) { | 
 |  167     case kFileSystemTypeTemporary: | 
 |  168       return fileapi::kTemporaryName; | 
 |  169     case kFileSystemTypePersistent: | 
 |  170       return fileapi::kPersistentName; | 
 |  171     case kFileSystemTypeExternal: | 
 |  172       return fileapi::kExternalName; | 
 |  173     case kFileSystemTypeUnknown: | 
 |  174     default: | 
 |  175       return std::string(); | 
 |  176   } | 
 |  177 } | 
 |  178  | 
|  165 }  // namespace fileapi |  179 }  // namespace fileapi | 
| OLD | NEW |