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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 | 270 |
271 FileSystemBackend* FileSystemContext::GetFileSystemBackend( | 271 FileSystemBackend* FileSystemContext::GetFileSystemBackend( |
272 FileSystemType type) const { | 272 FileSystemType type) const { |
273 FileSystemBackendMap::const_iterator found = backend_map_.find(type); | 273 FileSystemBackendMap::const_iterator found = backend_map_.find(type); |
274 if (found != backend_map_.end()) | 274 if (found != backend_map_.end()) |
275 return found->second; | 275 return found->second; |
276 NOTREACHED() << "Unknown filesystem type: " << type; | 276 NOTREACHED() << "Unknown filesystem type: " << type; |
277 return NULL; | 277 return NULL; |
278 } | 278 } |
279 | 279 |
| 280 WatcherManager* FileSystemContext::GetWatcherManager( |
| 281 FileSystemType type) const { |
| 282 FileSystemBackend* backend = GetFileSystemBackend(type); |
| 283 if (!backend) |
| 284 return NULL; |
| 285 return backend->GetWatcherManager(type); |
| 286 } |
| 287 |
280 bool FileSystemContext::IsSandboxFileSystem(FileSystemType type) const { | 288 bool FileSystemContext::IsSandboxFileSystem(FileSystemType type) const { |
281 FileSystemBackendMap::const_iterator found = backend_map_.find(type); | 289 FileSystemBackendMap::const_iterator found = backend_map_.find(type); |
282 return found != backend_map_.end() && found->second->GetQuotaUtil(); | 290 return found != backend_map_.end() && found->second->GetQuotaUtil(); |
283 } | 291 } |
284 | 292 |
285 const UpdateObserverList* FileSystemContext::GetUpdateObservers( | 293 const UpdateObserverList* FileSystemContext::GetUpdateObservers( |
286 FileSystemType type) const { | 294 FileSystemType type) const { |
287 FileSystemBackend* backend = GetFileSystemBackend(type); | 295 FileSystemBackend* backend = GetFileSystemBackend(type); |
288 if (backend->GetQuotaUtil()) | 296 if (backend->GetQuotaUtil()) |
289 return backend->GetQuotaUtil()->GetUpdateObservers(type); | 297 return backend->GetQuotaUtil()->GetUpdateObservers(type); |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 } else if (parent != child) { | 627 } else if (parent != child) { |
620 bool result = parent.AppendRelativePath(child, &path); | 628 bool result = parent.AppendRelativePath(child, &path); |
621 DCHECK(result); | 629 DCHECK(result); |
622 } | 630 } |
623 | 631 |
624 operation_runner()->GetMetadata( | 632 operation_runner()->GetMetadata( |
625 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); | 633 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); |
626 } | 634 } |
627 | 635 |
628 } // namespace storage | 636 } // namespace storage |
OLD | NEW |