Chromium Code Reviews| Index: chrome/browser/chromeos/gdata/gdata_util.h |
| diff --git a/chrome/browser/chromeos/gdata/gdata_util.h b/chrome/browser/chromeos/gdata/gdata_util.h |
| index 04e5e6d6fae9f7510de6a9c4dc6fc6d78486a2bd..3a30c63493ffcb8731aee4df0038b37c319a6c68 100644 |
| --- a/chrome/browser/chromeos/gdata/gdata_util.h |
| +++ b/chrome/browser/chromeos/gdata/gdata_util.h |
| @@ -9,6 +9,7 @@ |
| #include <vector> |
| #include "base/bind.h" |
| +#include "base/tracked_objects.h" |
|
achuithb
2012/08/04 08:12:25
I think you can probably fwd declare tracked_objec
satorux1
2012/08/04 08:16:34
Done.
|
| #include "base/memory/scoped_ptr.h" |
| #include "base/platform_file.h" |
| #include "base/time.h" |
| @@ -18,6 +19,10 @@ |
| class FilePath; |
| class Profile; |
| +namespace base { |
| +class SequencedTaskRunner; |
| +} // namespace base |
| + |
| namespace gdata { |
| namespace util { |
| @@ -112,7 +117,7 @@ std::string FormatTimeAsString(const base::Time& time); |
| // Callback type for PrepareWritableFilePathAndRun. |
| typedef base::Callback<void (GDataFileError, const FilePath& path)> |
| - OpenFileCallback; |
| + OpenFileCallback; |
| // Invokes |callback| on blocking thread pool, after converting virtual |path| |
| // string like "/special/drive/foo.txt" to the concrete local cache file path. |
| @@ -126,6 +131,24 @@ void PrepareWritableFileAndRun(Profile* profile, |
| const FilePath& path, |
| const OpenFileCallback& callback); |
| +// Converts gdata error code into file platform error code. |
| +GDataFileError GDataToGDataFileError(GDataErrorCode status); |
| + |
| +// Wrapper around BrowserThread::PostTask to post a task to the blocking |
| +// pool with the given sequence token. |
| +void PostBlockingPoolSequencedTask( |
| + const tracked_objects::Location& from_here, |
| + base::SequencedTaskRunner* blocking_task_runner, |
| + const base::Closure& task); |
| + |
| +// Similar to PostBlockingPoolSequencedTask() but this one takes a reply |
| +// callback that runs on the calling thread. |
| +void PostBlockingPoolSequencedTaskAndReply( |
| + const tracked_objects::Location& from_here, |
| + base::SequencedTaskRunner* blocking_task_runner, |
| + const base::Closure& request_task, |
| + const base::Closure& reply_task); |
| + |
| } // namespace util |
| } // namespace gdata |