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

Side by Side Diff: chrome/browser/chromeos/drive/write_on_cache_file.h

Issue 23050014: Convert drive::FileWriteHelper to a single function for simplification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_WRITE_ON_CACHE_FILE_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_WRITE_ON_CACHE_FILE_H_
7
8 #include "base/callback_forward.h"
9 #include "chrome/browser/chromeos/drive/file_errors.h"
10
11 namespace base {
12 class FilePath;
13 }
14
15 namespace drive {
16
17 class FileSystemInterface;
18
19 // Callback type for WriteOnCacheFile.
20 typedef base::Callback<void (FileError, const base::FilePath& path)>
21 WriteOnCacheFileCallback;
22
23 // Creates (if needed) a file at |path|, brings it to the local cache,
24 // and invokes |callback| on blocking thread pool with the cache file path.
25 // The |callback| can write to the file at the path by normal local file I/O
26 // operations. After it returns, the written content is synced to the server.
27 //
28 // Must be called from UI thread.
29 void WriteOnCacheFile(FileSystemInterface* file_system,
30 const base::FilePath& path,
31 const WriteOnCacheFileCallback& callback);
32
33 } // namespace drive
34
35 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_WRITE_ON_CACHE_FILE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_write_helper_unittest.cc ('k') | chrome/browser/chromeos/drive/write_on_cache_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698