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

Side by Side Diff: chrome/browser/chromeos/drive/file_system_proxy.cc

Issue 15648007: Call FileSystem::TouchFile from FileSystemProxy. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_proxy.h" 5 #include "chrome/browser/chromeos/drive/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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 file_path)))); 613 file_path))));
614 } 614 }
615 615
616 void FileSystemProxy::TouchFile( 616 void FileSystemProxy::TouchFile(
617 const fileapi::FileSystemURL& url, 617 const fileapi::FileSystemURL& url,
618 const base::Time& last_access_time, 618 const base::Time& last_access_time,
619 const base::Time& last_modified_time, 619 const base::Time& last_modified_time,
620 const FileSystemOperation::StatusCallback& callback) { 620 const FileSystemOperation::StatusCallback& callback) {
621 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 621 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
622 622
623 // TODO(kinaba,kochi): crbug.com/144369. Support this operations once we have 623 base::FilePath file_path;
624 // migrated to the new Drive API. 624 if (!ValidateUrl(url, &file_path))
625 MessageLoopProxy::current()->PostTask( 625 return;
626 FROM_HERE, 626
627 base::Bind(callback, base::PLATFORM_FILE_ERROR_INVALID_OPERATION)); 627 CallFileSystemMethodOnUIThread(
628 base::Bind(&FileSystemInterface::TouchFile,
629 base::Unretained(file_system_),
630 file_path, last_access_time, last_modified_time,
631 google_apis::CreateRelayCallback(
632 base::Bind(&FileSystemProxy::OnStatusCallback,
633 this,
634 callback))));
628 } 635 }
629 636
630 void FileSystemProxy::CreateSnapshotFile( 637 void FileSystemProxy::CreateSnapshotFile(
631 const FileSystemURL& file_url, 638 const FileSystemURL& file_url,
632 const FileSystemOperation::SnapshotFileCallback& callback) { 639 const FileSystemOperation::SnapshotFileCallback& callback) {
633 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 640 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
634 641
635 base::FilePath file_path; 642 base::FilePath file_path;
636 if (!ValidateUrl(file_url, &file_path)) { 643 if (!ValidateUrl(file_url, &file_path)) {
637 MessageLoopProxy::current()->PostTask( 644 MessageLoopProxy::current()->PostTask(
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 base::Bind(&EmitDebugLogForCloseFile, 865 base::Bind(&EmitDebugLogForCloseFile,
859 virtual_path)))); 866 virtual_path))));
860 } 867 }
861 868
862 FileSystemInterface* FileSystemProxy::GetFileSystemOnUIThread() { 869 FileSystemInterface* FileSystemProxy::GetFileSystemOnUIThread() {
863 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 870 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
864 return file_system_; 871 return file_system_;
865 } 872 }
866 873
867 } // namespace drive 874 } // namespace drive
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698