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 "chrome/browser/chromeos/gdata/gdata_file_system_proxy.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_file_system_proxy.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 } | 396 } |
397 | 397 |
398 file_system_->GetFileByPath(file_path, | 398 file_system_->GetFileByPath(file_path, |
399 base::Bind(&OnGetFileByPathForOpen, | 399 base::Bind(&OnGetFileByPathForOpen, |
400 callback, | 400 callback, |
401 file_flags, | 401 file_flags, |
402 peer_handle), | 402 peer_handle), |
403 GetDownloadDataCallback()); | 403 GetDownloadDataCallback()); |
404 } | 404 } |
405 | 405 |
| 406 void GDataFileSystemProxy::NotifyCloseFile(const FileSystemURL& url) { |
| 407 // TODO(kinaba,zelidrag): crbug.com/132236. |
| 408 // Once OpenFile() for writing is implemented, we also need to implement the |
| 409 // corresponding NotifyCloseFile for committing dirty cache. |
| 410 } |
| 411 |
406 void GDataFileSystemProxy::CreateSnapshotFile( | 412 void GDataFileSystemProxy::CreateSnapshotFile( |
407 const FileSystemURL& file_url, | 413 const FileSystemURL& file_url, |
408 const FileSystemOperationInterface::SnapshotFileCallback& callback) { | 414 const FileSystemOperationInterface::SnapshotFileCallback& callback) { |
409 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 415 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
410 | 416 |
411 FilePath file_path; | 417 FilePath file_path; |
412 if (!ValidateUrl(file_url, &file_path)) { | 418 if (!ValidateUrl(file_url, &file_path)) { |
413 MessageLoopProxy::current()->PostTask(FROM_HERE, | 419 MessageLoopProxy::current()->PostTask(FROM_HERE, |
414 base::Bind(callback, | 420 base::Bind(callback, |
415 base::PLATFORM_FILE_ERROR_NOT_FOUND, | 421 base::PLATFORM_FILE_ERROR_NOT_FOUND, |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 | 576 |
571 void GDataFileSystemProxy::CloseWritableSnapshotFile( | 577 void GDataFileSystemProxy::CloseWritableSnapshotFile( |
572 const FilePath& virtual_path, | 578 const FilePath& virtual_path, |
573 const FilePath& local_path) { | 579 const FilePath& local_path) { |
574 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 580 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
575 | 581 |
576 file_system_->CloseFile(virtual_path, base::Bind(&OnClose, virtual_path)); | 582 file_system_->CloseFile(virtual_path, base::Bind(&OnClose, virtual_path)); |
577 } | 583 } |
578 | 584 |
579 } // namespace gdata | 585 } // namespace gdata |
OLD | NEW |