| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 return isolated_provider_.get(); | 126 return isolated_provider_.get(); |
| 127 default: | 127 default: |
| 128 if (provider_map_.find(type) != provider_map_.end()) | 128 if (provider_map_.find(type) != provider_map_.end()) |
| 129 return provider_map_.find(type)->second; | 129 return provider_map_.find(type)->second; |
| 130 // Fall through. | 130 // Fall through. |
| 131 case kFileSystemTypeUnknown: | 131 case kFileSystemTypeUnknown: |
| 132 case kFileSystemTypeDragged: |
| 132 NOTREACHED(); | 133 NOTREACHED(); |
| 133 return NULL; | 134 return NULL; |
| 134 } | 135 } |
| 135 } | 136 } |
| 136 | 137 |
| 137 SandboxMountPointProvider* | 138 SandboxMountPointProvider* |
| 138 FileSystemContext::sandbox_provider() const { | 139 FileSystemContext::sandbox_provider() const { |
| 139 return sandbox_provider_.get(); | 140 return sandbox_provider_.get(); |
| 140 } | 141 } |
| 141 | 142 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 if (!io_task_runner_->RunsTasksOnCurrentThread() && | 204 if (!io_task_runner_->RunsTasksOnCurrentThread() && |
| 204 io_task_runner_->DeleteSoon(FROM_HERE, this)) { | 205 io_task_runner_->DeleteSoon(FROM_HERE, this)) { |
| 205 return; | 206 return; |
| 206 } | 207 } |
| 207 STLDeleteContainerPairSecondPointers(provider_map_.begin(), | 208 STLDeleteContainerPairSecondPointers(provider_map_.begin(), |
| 208 provider_map_.end()); | 209 provider_map_.end()); |
| 209 delete this; | 210 delete this; |
| 210 } | 211 } |
| 211 | 212 |
| 212 } // namespace fileapi | 213 } // namespace fileapi |
| OLD | NEW |