| 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 15 matching lines...) Expand all Loading... |
| 26 using base::MessageLoopProxy; | 26 using base::MessageLoopProxy; |
| 27 using content::BrowserThread; | 27 using content::BrowserThread; |
| 28 using fileapi::FileSystemURL; | 28 using fileapi::FileSystemURL; |
| 29 using fileapi::FileSystemOperationInterface; | 29 using fileapi::FileSystemOperationInterface; |
| 30 using webkit_blob::ShareableFileReference; | 30 using webkit_blob::ShareableFileReference; |
| 31 | 31 |
| 32 namespace gdata { | 32 namespace gdata { |
| 33 | 33 |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 const char kGDataRootDirectory[] = "drive"; | 36 const char kDriveRootDirectory[] = "drive"; |
| 37 const char kFeedField[] = "feed"; | 37 const char kFeedField[] = "feed"; |
| 38 | 38 |
| 39 // Helper function that creates platform file on blocking IO thread pool. | 39 // Helper function that creates platform file on blocking IO thread pool. |
| 40 void OpenPlatformFileOnIOPool(const FilePath& local_path, | 40 void OpenPlatformFileOnIOPool(const FilePath& local_path, |
| 41 int file_flags, | 41 int file_flags, |
| 42 base::PlatformFile* platform_file, | 42 base::PlatformFile* platform_file, |
| 43 base::PlatformFileError* open_error) { | 43 base::PlatformFileError* open_error) { |
| 44 bool created; | 44 bool created; |
| 45 *platform_file = base::CreatePlatformFile(local_path, | 45 *platform_file = base::CreatePlatformFile(local_path, |
| 46 file_flags, | 46 file_flags, |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 void GDataFileSystemProxy::CloseWritableSnapshotFile( | 733 void GDataFileSystemProxy::CloseWritableSnapshotFile( |
| 734 const FilePath& virtual_path, | 734 const FilePath& virtual_path, |
| 735 const FilePath& local_path) { | 735 const FilePath& local_path) { |
| 736 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 736 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 737 | 737 |
| 738 file_system_->CloseFile(virtual_path, | 738 file_system_->CloseFile(virtual_path, |
| 739 base::Bind(&EmitDebugLogForCloseFile, virtual_path)); | 739 base::Bind(&EmitDebugLogForCloseFile, virtual_path)); |
| 740 } | 740 } |
| 741 | 741 |
| 742 } // namespace gdata | 742 } // namespace gdata |
| OLD | NEW |