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 "storage/browser/fileapi/file_system_context.h" | 5 #include "storage/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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 } | 577 } |
578 | 578 |
579 void FileSystemContext::RegisterBackend(FileSystemBackend* backend) { | 579 void FileSystemContext::RegisterBackend(FileSystemBackend* backend) { |
580 const FileSystemType mount_types[] = { | 580 const FileSystemType mount_types[] = { |
581 kFileSystemTypeTemporary, | 581 kFileSystemTypeTemporary, |
582 kFileSystemTypePersistent, | 582 kFileSystemTypePersistent, |
583 kFileSystemTypeIsolated, | 583 kFileSystemTypeIsolated, |
584 kFileSystemTypeExternal, | 584 kFileSystemTypeExternal, |
585 }; | 585 }; |
586 // Register file system backends for public mount types. | 586 // Register file system backends for public mount types. |
587 for (size_t j = 0; j < ARRAYSIZE_UNSAFE(mount_types); ++j) { | 587 for (size_t j = 0; j < arraysize(mount_types); ++j) { |
588 if (backend->CanHandleType(mount_types[j])) { | 588 if (backend->CanHandleType(mount_types[j])) { |
589 const bool inserted = backend_map_.insert( | 589 const bool inserted = backend_map_.insert( |
590 std::make_pair(mount_types[j], backend)).second; | 590 std::make_pair(mount_types[j], backend)).second; |
591 DCHECK(inserted); | 591 DCHECK(inserted); |
592 } | 592 } |
593 } | 593 } |
594 // Register file system backends for internal types. | 594 // Register file system backends for internal types. |
595 for (int t = kFileSystemInternalTypeEnumStart + 1; | 595 for (int t = kFileSystemInternalTypeEnumStart + 1; |
596 t < kFileSystemInternalTypeEnumEnd; ++t) { | 596 t < kFileSystemInternalTypeEnumEnd; ++t) { |
597 FileSystemType type = static_cast<FileSystemType>(t); | 597 FileSystemType type = static_cast<FileSystemType>(t); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 } else if (parent != child) { | 630 } else if (parent != child) { |
631 bool result = parent.AppendRelativePath(child, &path); | 631 bool result = parent.AppendRelativePath(child, &path); |
632 DCHECK(result); | 632 DCHECK(result); |
633 } | 633 } |
634 | 634 |
635 operation_runner()->GetMetadata( | 635 operation_runner()->GetMetadata( |
636 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); | 636 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); |
637 } | 637 } |
638 | 638 |
639 } // namespace storage | 639 } // namespace storage |
OLD | NEW |