| 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/browser/fileapi/file_system_context.h" | 5 #include "webkit/browser/fileapi/file_system_context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/task_runner_util.h" | 10 #include "base/task_runner_util.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 RegisterBackend(sandbox_backend_.get()); | 132 RegisterBackend(sandbox_backend_.get()); |
| 133 RegisterBackend(isolated_backend_.get()); | 133 RegisterBackend(isolated_backend_.get()); |
| 134 | 134 |
| 135 for (ScopedVector<FileSystemBackend>::const_iterator iter = | 135 for (ScopedVector<FileSystemBackend>::const_iterator iter = |
| 136 additional_backends_.begin(); | 136 additional_backends_.begin(); |
| 137 iter != additional_backends_.end(); ++iter) { | 137 iter != additional_backends_.end(); ++iter) { |
| 138 RegisterBackend(*iter); | 138 RegisterBackend(*iter); |
| 139 } | 139 } |
| 140 | 140 |
| 141 for (FileSystemBackendMap::const_iterator iter = backend_map_.begin(); |
| 142 iter != backend_map_.end(); ++iter) { |
| 143 iter->second->Initialize(this); |
| 144 } |
| 145 |
| 141 // Additional mount points must be added before regular system-wide | 146 // Additional mount points must be added before regular system-wide |
| 142 // mount points. | 147 // mount points. |
| 143 if (external_mount_points) | 148 if (external_mount_points) |
| 144 url_crackers_.push_back(external_mount_points); | 149 url_crackers_.push_back(external_mount_points); |
| 145 url_crackers_.push_back(ExternalMountPoints::GetSystemInstance()); | 150 url_crackers_.push_back(ExternalMountPoints::GetSystemInstance()); |
| 146 url_crackers_.push_back(IsolatedContext::GetInstance()); | 151 url_crackers_.push_back(IsolatedContext::GetInstance()); |
| 147 } | 152 } |
| 148 | 153 |
| 149 bool FileSystemContext::DeleteDataForOriginOnFileThread( | 154 bool FileSystemContext::DeleteDataForOriginOnFileThread( |
| 150 const GURL& origin_url) { | 155 const GURL& origin_url) { |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 FileSystemType type = static_cast<FileSystemType>(t); | 455 FileSystemType type = static_cast<FileSystemType>(t); |
| 451 if (backend->CanHandleType(type)) { | 456 if (backend->CanHandleType(type)) { |
| 452 const bool inserted = backend_map_.insert( | 457 const bool inserted = backend_map_.insert( |
| 453 std::make_pair(type, backend)).second; | 458 std::make_pair(type, backend)).second; |
| 454 DCHECK(inserted); | 459 DCHECK(inserted); |
| 455 } | 460 } |
| 456 } | 461 } |
| 457 } | 462 } |
| 458 | 463 |
| 459 } // namespace fileapi | 464 } // namespace fileapi |
| OLD | NEW |