| 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/drive/file_system.h" | 5 #include "chrome/browser/chromeos/drive/file_system.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 | 412 |
| 413 void FileSystem::TouchFile(const base::FilePath& file_path, | 413 void FileSystem::TouchFile(const base::FilePath& file_path, |
| 414 const base::Time& last_access_time, | 414 const base::Time& last_access_time, |
| 415 const base::Time& last_modified_time, | 415 const base::Time& last_modified_time, |
| 416 const FileOperationCallback& callback) { | 416 const FileOperationCallback& callback) { |
| 417 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 417 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 418 DCHECK(!last_access_time.is_null()); | 418 DCHECK(!last_access_time.is_null()); |
| 419 DCHECK(!last_modified_time.is_null()); | 419 DCHECK(!last_modified_time.is_null()); |
| 420 DCHECK(!callback.is_null()); | 420 DCHECK(!callback.is_null()); |
| 421 | 421 |
| 422 // TODO(hidehiko): Implement this (crbug.com/144369). | 422 drive_operations_.TouchFile( |
| 423 NOTIMPLEMENTED(); | 423 file_path, last_access_time, last_modified_time, callback); |
| 424 } | 424 } |
| 425 | 425 |
| 426 void FileSystem::Pin(const base::FilePath& file_path, | 426 void FileSystem::Pin(const base::FilePath& file_path, |
| 427 const FileOperationCallback& callback) { | 427 const FileOperationCallback& callback) { |
| 428 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 428 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 429 DCHECK(!callback.is_null()); | 429 DCHECK(!callback.is_null()); |
| 430 | 430 |
| 431 GetResourceEntryByPath(file_path, | 431 GetResourceEntryByPath(file_path, |
| 432 base::Bind(&FileSystem::PinAfterGetResourceEntryByPath, | 432 base::Bind(&FileSystem::PinAfterGetResourceEntryByPath, |
| 433 weak_ptr_factory_.GetWeakPtr(), | 433 weak_ptr_factory_.GetWeakPtr(), |
| (...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1662 util::ConvertPlatformFileInfoToResourceEntry(*file_info, &entry_file_info); | 1662 util::ConvertPlatformFileInfoToResourceEntry(*file_info, &entry_file_info); |
| 1663 *entry->mutable_file_info() = entry_file_info; | 1663 *entry->mutable_file_info() = entry_file_info; |
| 1664 callback.Run(FILE_ERROR_OK, entry.Pass()); | 1664 callback.Run(FILE_ERROR_OK, entry.Pass()); |
| 1665 } | 1665 } |
| 1666 | 1666 |
| 1667 void FileSystem::CancelJobInScheduler(JobID id) { | 1667 void FileSystem::CancelJobInScheduler(JobID id) { |
| 1668 scheduler_->CancelJob(id); | 1668 scheduler_->CancelJob(id); |
| 1669 } | 1669 } |
| 1670 | 1670 |
| 1671 } // namespace drive | 1671 } // namespace drive |
| OLD | NEW |