| 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_path_manager.h" | 5 #include "webkit/fileapi/file_system_path_manager.h" |
| 6 | 6 |
| 7 #include "base/rand_util.h" | 7 #include "base/rand_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/scoped_callback_factory.h" | 9 #include "base/memory/scoped_callback_factory.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 } | 153 } |
| 154 break; | 154 break; |
| 155 case kFileSystemTypeUnknown: | 155 case kFileSystemTypeUnknown: |
| 156 default: | 156 default: |
| 157 NOTREACHED(); | 157 NOTREACHED(); |
| 158 return false; | 158 return false; |
| 159 } | 159 } |
| 160 return true; | 160 return true; |
| 161 } | 161 } |
| 162 | 162 |
| 163 FileSystemFileUtil* FileSystemPathManager::GetFileSystemFileUtil( | 163 FileApiFileUtil* FileSystemPathManager::GetFileUtil( |
| 164 FileSystemType type) const { | 164 FileSystemType type) const { |
| 165 switch (type) { | 165 switch (type) { |
| 166 case kFileSystemTypeTemporary: | 166 case kFileSystemTypeTemporary: |
| 167 case kFileSystemTypePersistent: | 167 case kFileSystemTypePersistent: |
| 168 return sandbox_provider_->GetFileSystemFileUtil(); | 168 return sandbox_provider_->GetFileUtil(); |
| 169 case kFileSystemTypeExternal: | 169 case kFileSystemTypeExternal: |
| 170 if (external_provider_.get()) { | 170 if (external_provider_.get()) { |
| 171 return external_provider_->GetFileSystemFileUtil(); | 171 return external_provider_->GetFileUtil(); |
| 172 } else { | 172 } else { |
| 173 NOTREACHED(); | 173 NOTREACHED(); |
| 174 return NULL; | 174 return NULL; |
| 175 } | 175 } |
| 176 case kFileSystemTypeUnknown: | 176 case kFileSystemTypeUnknown: |
| 177 default: | 177 default: |
| 178 NOTREACHED(); | 178 NOTREACHED(); |
| 179 return NULL; | 179 return NULL; |
| 180 } | 180 } |
| 181 } | 181 } |
| 182 | 182 |
| 183 } // namespace fileapi | 183 } // namespace fileapi |
| 184 | 184 |
| 185 COMPILE_ASSERT(int(WebFileSystem::TypeTemporary) == \ | 185 COMPILE_ASSERT(int(WebFileSystem::TypeTemporary) == \ |
| 186 int(fileapi::kFileSystemTypeTemporary), mismatching_enums); | 186 int(fileapi::kFileSystemTypeTemporary), mismatching_enums); |
| 187 COMPILE_ASSERT(int(WebFileSystem::TypePersistent) == \ | 187 COMPILE_ASSERT(int(WebFileSystem::TypePersistent) == \ |
| 188 int(fileapi::kFileSystemTypePersistent), mismatching_enums); | 188 int(fileapi::kFileSystemTypePersistent), mismatching_enums); |
| 189 COMPILE_ASSERT(int(WebFileSystem::TypeExternal) == \ | 189 COMPILE_ASSERT(int(WebFileSystem::TypeExternal) == \ |
| 190 int(fileapi::kFileSystemTypeExternal), mismatching_enums); | 190 int(fileapi::kFileSystemTypeExternal), mismatching_enums); |
| OLD | NEW |