| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 iter != additional_backends_.end(); ++iter) { | 176 iter != additional_backends_.end(); ++iter) { |
| 177 RegisterBackend(*iter); | 177 RegisterBackend(*iter); |
| 178 } | 178 } |
| 179 | 179 |
| 180 // If the embedder's additional backends already provide support for | 180 // If the embedder's additional backends already provide support for |
| 181 // kFileSystemTypeNativeLocal and kFileSystemTypeNativeForPlatformApp then | 181 // kFileSystemTypeNativeLocal and kFileSystemTypeNativeForPlatformApp then |
| 182 // IsolatedFileSystemBackend does not need to handle them. For example, on | 182 // IsolatedFileSystemBackend does not need to handle them. For example, on |
| 183 // Chrome OS the additional backend chromeos::FileSystemBackend handles these | 183 // Chrome OS the additional backend chromeos::FileSystemBackend handles these |
| 184 // types. | 184 // types. |
| 185 isolated_backend_.reset(new IsolatedFileSystemBackend( | 185 isolated_backend_.reset(new IsolatedFileSystemBackend( |
| 186 !ContainsKey(backend_map_, kFileSystemTypeNativeLocal), | 186 !base::ContainsKey(backend_map_, kFileSystemTypeNativeLocal), |
| 187 !ContainsKey(backend_map_, kFileSystemTypeNativeForPlatformApp))); | 187 !base::ContainsKey(backend_map_, kFileSystemTypeNativeForPlatformApp))); |
| 188 RegisterBackend(isolated_backend_.get()); | 188 RegisterBackend(isolated_backend_.get()); |
| 189 | 189 |
| 190 if (quota_manager_proxy) { | 190 if (quota_manager_proxy) { |
| 191 // Quota client assumes all backends have registered. | 191 // Quota client assumes all backends have registered. |
| 192 quota_manager_proxy->RegisterClient(CreateQuotaClient( | 192 quota_manager_proxy->RegisterClient(CreateQuotaClient( |
| 193 this, options.is_incognito())); | 193 this, options.is_incognito())); |
| 194 } | 194 } |
| 195 | 195 |
| 196 sandbox_backend_->Initialize(this); | 196 sandbox_backend_->Initialize(this); |
| 197 isolated_backend_->Initialize(this); | 197 isolated_backend_->Initialize(this); |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 | 633 |
| 634 // TODO(mtomasz): Not all fields should be required for ResolveURL. | 634 // TODO(mtomasz): Not all fields should be required for ResolveURL. |
| 635 operation_runner()->GetMetadata( | 635 operation_runner()->GetMetadata( |
| 636 url, FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY | | 636 url, FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY | |
| 637 FileSystemOperation::GET_METADATA_FIELD_SIZE | | 637 FileSystemOperation::GET_METADATA_FIELD_SIZE | |
| 638 FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED, | 638 FileSystemOperation::GET_METADATA_FIELD_LAST_MODIFIED, |
| 639 base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); | 639 base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); |
| 640 } | 640 } |
| 641 | 641 |
| 642 } // namespace storage | 642 } // namespace storage |
| OLD | NEW |