Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: chrome/browser/chromeos/drive/file_system/drive_operations.cc

Issue 15728006: Implement TouchFile on drive::FileSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/drive/file_system/drive_operations.cc
diff --git a/chrome/browser/chromeos/drive/file_system/drive_operations.cc b/chrome/browser/chromeos/drive/file_system/drive_operations.cc
index 2a842458c27fe19dd5ccb49d51455fa8e3ae3baf..4091a589c7db3e01fd6ef4859b5fd8de2b178697 100644
--- a/chrome/browser/chromeos/drive/file_system/drive_operations.cc
+++ b/chrome/browser/chromeos/drive/file_system/drive_operations.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/chromeos/drive/file_system/move_operation.h"
#include "chrome/browser/chromeos/drive/file_system/remove_operation.h"
#include "chrome/browser/chromeos/drive/file_system/search_operation.h"
+#include "chrome/browser/chromeos/drive/file_system/touch_operation.h"
#include "chrome/browser/chromeos/drive/file_system/update_operation.h"
#include "content/public/browser/browser_thread.h"
@@ -55,6 +56,8 @@ void DriveOperations::Init(OperationObserver* observer,
new MoveOperation(observer, scheduler, metadata));
remove_operation_.reset(
new RemoveOperation(observer, scheduler, metadata, cache));
+ touch_operation_.reset(
+ new TouchOperation(blocking_task_runner, observer, scheduler, metadata));
update_operation_.reset(
new UpdateOperation(observer, scheduler, metadata, cache));
search_operation_.reset(
@@ -132,6 +135,19 @@ void DriveOperations::Remove(const base::FilePath& file_path,
remove_operation_->Remove(file_path, is_recursive, callback);
}
+void DriveOperations::TouchFile(const base::FilePath& file_path,
+ const base::Time& last_access_time,
+ const base::Time& last_modified_time,
+ const FileOperationCallback& callback) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK(!last_access_time.is_null());
+ DCHECK(!last_modified_time.is_null());
+ DCHECK(!callback.is_null());
+
+ touch_operation_->TouchFile(
+ file_path, last_access_time, last_modified_time, callback);
+}
+
void DriveOperations::UpdateFileByResourceId(
const std::string& resource_id,
DriveClientContext context,

Powered by Google App Engine
This is Rietveld 408576698