OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/sandbox_file_system_backend_delegate.h" | 5 #include "storage/browser/fileapi/sandbox_file_system_backend_delegate.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 const UpdateObserverList* update_observers = GetUpdateObservers(url.type()); | 287 const UpdateObserverList* update_observers = GetUpdateObservers(url.type()); |
288 const ChangeObserverList* change_observers = GetChangeObservers(url.type()); | 288 const ChangeObserverList* change_observers = GetChangeObservers(url.type()); |
289 DCHECK(update_observers); | 289 DCHECK(update_observers); |
290 | 290 |
291 scoped_ptr<FileSystemOperationContext> operation_context( | 291 scoped_ptr<FileSystemOperationContext> operation_context( |
292 new FileSystemOperationContext(context)); | 292 new FileSystemOperationContext(context)); |
293 operation_context->set_update_observers(*update_observers); | 293 operation_context->set_update_observers(*update_observers); |
294 operation_context->set_change_observers( | 294 operation_context->set_change_observers( |
295 change_observers ? *change_observers : ChangeObserverList()); | 295 change_observers ? *change_observers : ChangeObserverList()); |
296 | 296 |
297 return operation_context.Pass(); | 297 return operation_context; |
298 } | 298 } |
299 | 299 |
300 scoped_ptr<storage::FileStreamReader> | 300 scoped_ptr<storage::FileStreamReader> |
301 SandboxFileSystemBackendDelegate::CreateFileStreamReader( | 301 SandboxFileSystemBackendDelegate::CreateFileStreamReader( |
302 const FileSystemURL& url, | 302 const FileSystemURL& url, |
303 int64_t offset, | 303 int64_t offset, |
304 const base::Time& expected_modification_time, | 304 const base::Time& expected_modification_time, |
305 FileSystemContext* context) const { | 305 FileSystemContext* context) const { |
306 if (!IsAccessValid(url)) | 306 if (!IsAccessValid(url)) |
307 return scoped_ptr<storage::FileStreamReader>(); | 307 return scoped_ptr<storage::FileStreamReader>(); |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 return new ObfuscatedFileUtil(special_storage_policy, | 694 return new ObfuscatedFileUtil(special_storage_policy, |
695 file_system_directory, | 695 file_system_directory, |
696 env_override, | 696 env_override, |
697 file_task_runner, | 697 file_task_runner, |
698 base::Bind(&GetTypeStringForURL), | 698 base::Bind(&GetTypeStringForURL), |
699 GetKnownTypeStrings(), | 699 GetKnownTypeStrings(), |
700 NULL); | 700 NULL); |
701 } | 701 } |
702 | 702 |
703 } // namespace storage | 703 } // namespace storage |
OLD | NEW |