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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc

Issue 10541113: Notify CloseFile from Pepper to FileSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 years, 5 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
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/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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 380 }
381 381
382 file_system_->GetFileByPath(file_path, 382 file_system_->GetFileByPath(file_path,
383 base::Bind(&OnGetFileByPathForOpen, 383 base::Bind(&OnGetFileByPathForOpen,
384 callback, 384 callback,
385 file_flags, 385 file_flags,
386 peer_handle), 386 peer_handle),
387 GetDownloadDataCallback()); 387 GetDownloadDataCallback());
388 } 388 }
389 389
390 void GDataFileSystemProxy::NotifyCloseFile(const FileSystemURL& url) {
391 // TODO(kinaba,zelidrag): crbug.com/132236.
392 // Once OpenFile() for writing is implemented, we also need to implement the
393 // corresponding NotifyCloseFile for committing dirty cache.
394 }
395
390 void GDataFileSystemProxy::CreateSnapshotFile( 396 void GDataFileSystemProxy::CreateSnapshotFile(
391 const FileSystemURL& file_url, 397 const FileSystemURL& file_url,
392 const FileSystemOperationInterface::SnapshotFileCallback& callback) { 398 const FileSystemOperationInterface::SnapshotFileCallback& callback) {
393 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 399 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
394 400
395 FilePath file_path; 401 FilePath file_path;
396 if (!ValidateUrl(file_url, &file_path)) { 402 if (!ValidateUrl(file_url, &file_path)) {
397 MessageLoopProxy::current()->PostTask(FROM_HERE, 403 MessageLoopProxy::current()->PostTask(FROM_HERE,
398 base::Bind(callback, 404 base::Bind(callback,
399 base::PLATFORM_FILE_ERROR_NOT_FOUND, 405 base::PLATFORM_FILE_ERROR_NOT_FOUND,
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 560
555 void GDataFileSystemProxy::CloseWritableSnapshotFile( 561 void GDataFileSystemProxy::CloseWritableSnapshotFile(
556 const FilePath& virtual_path, 562 const FilePath& virtual_path,
557 const FilePath& local_path) { 563 const FilePath& local_path) {
558 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 564 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
559 565
560 file_system_->CloseFile(virtual_path, base::Bind(&OnClose, virtual_path)); 566 file_system_->CloseFile(virtual_path, base::Bind(&OnClose, virtual_path));
561 } 567 }
562 568
563 } // namespace gdata 569 } // namespace gdata
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698