| 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_context.h" | 5 #include "webkit/fileapi/file_system_context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 FileSystemMountPointProvider* FileSystemContext::GetMountPointProvider( | 117 FileSystemMountPointProvider* FileSystemContext::GetMountPointProvider( |
| 118 FileSystemType type) const { | 118 FileSystemType type) const { |
| 119 switch (type) { | 119 switch (type) { |
| 120 case kFileSystemTypeTemporary: | 120 case kFileSystemTypeTemporary: |
| 121 case kFileSystemTypePersistent: | 121 case kFileSystemTypePersistent: |
| 122 return sandbox_provider_.get(); | 122 return sandbox_provider_.get(); |
| 123 case kFileSystemTypeExternal: | 123 case kFileSystemTypeExternal: |
| 124 return external_provider_.get(); | 124 return external_provider_.get(); |
| 125 case kFileSystemTypeIsolated: | 125 case kFileSystemTypeIsolated: |
| 126 case kFileSystemTypeDragged: | 126 case kFileSystemTypeDragged: |
| 127 case kFileSystemTypeNativeMedia: |
| 128 case kFileSystemTypeDeviceMedia: |
| 127 return isolated_provider_.get(); | 129 return isolated_provider_.get(); |
| 128 default: | 130 default: |
| 129 if (provider_map_.find(type) != provider_map_.end()) | 131 if (provider_map_.find(type) != provider_map_.end()) |
| 130 return provider_map_.find(type)->second; | 132 return provider_map_.find(type)->second; |
| 131 // Fall through. | 133 // Fall through. |
| 132 case kFileSystemTypeUnknown: | 134 case kFileSystemTypeUnknown: |
| 133 NOTREACHED(); | 135 NOTREACHED(); |
| 134 return NULL; | 136 return NULL; |
| 135 } | 137 } |
| 136 } | 138 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 if (!io_task_runner_->RunsTasksOnCurrentThread() && | 206 if (!io_task_runner_->RunsTasksOnCurrentThread() && |
| 205 io_task_runner_->DeleteSoon(FROM_HERE, this)) { | 207 io_task_runner_->DeleteSoon(FROM_HERE, this)) { |
| 206 return; | 208 return; |
| 207 } | 209 } |
| 208 STLDeleteContainerPairSecondPointers(provider_map_.begin(), | 210 STLDeleteContainerPairSecondPointers(provider_map_.begin(), |
| 209 provider_map_.end()); | 211 provider_map_.end()); |
| 210 delete this; | 212 delete this; |
| 211 } | 213 } |
| 212 | 214 |
| 213 } // namespace fileapi | 215 } // namespace fileapi |
| OLD | NEW |