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

Unified Diff: chrome/browser/chromeos/drive/file_system/update_operation.h

Issue 15974004: drive: Rewrite UpdateOpreation to access cache/metadata on the blocking pool (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ClearDirtyOnUIThread 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/update_operation.h
diff --git a/chrome/browser/chromeos/drive/file_system/update_operation.h b/chrome/browser/chromeos/drive/file_system/update_operation.h
index 9e2e9406c9b017bc0467993a59a01450e10b946a..92558364feb65e983ac82324a55500963d6a6000 100644
--- a/chrome/browser/chromeos/drive/file_system/update_operation.h
+++ b/chrome/browser/chromeos/drive/file_system/update_operation.h
@@ -6,13 +6,16 @@
#define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_UPDATE_OPERATION_H_
#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "chrome/browser/chromeos/drive/file_errors.h"
#include "chrome/browser/chromeos/drive/file_system_interface.h"
#include "chrome/browser/google_apis/gdata_errorcode.h"
namespace base {
class FilePath;
+class SequencedTaskRunner;
} // namespace base
namespace drive {
@@ -34,7 +37,8 @@ class OperationObserver;
// metadata to reflect the new state.
class UpdateOperation {
public:
- UpdateOperation(OperationObserver* observer,
+ UpdateOperation(base::SequencedTaskRunner* blocking_task_runner,
+ OperationObserver* observer,
JobScheduler* scheduler,
internal::ResourceMetadata* metadata,
internal::FileCache* cache);
@@ -50,29 +54,23 @@ class UpdateOperation {
const FileOperationCallback& callback);
private:
- void UpdateFileAfterGetEntryInfo(DriveClientContext context,
- const FileOperationCallback& callback,
- FileError error,
- const base::FilePath& drive_file_path,
- scoped_ptr<ResourceEntry> entry);
-
- void UpdateFileAfterGetFile(DriveClientContext context,
- const FileOperationCallback& callback,
- const base::FilePath& drive_file_path,
- scoped_ptr<ResourceEntry> entry,
- FileError error,
- const base::FilePath& cache_file_path);
+ void UpdateFileAfterGetLocalState(DriveClientContext context,
+ const FileOperationCallback& callback,
+ const ResourceEntry* entry,
+ const base::FilePath* drive_file_path,
+ const base::FilePath* cache_file_path,
+ FileError error);
void UpdateFileAfterUpload(
const FileOperationCallback& callback,
google_apis::GDataErrorCode error,
scoped_ptr<google_apis::ResourceEntry> resource_entry);
- void UpdateFileAfterRefresh(const FileOperationCallback& callback,
- FileError error,
- const base::FilePath& drive_file_path,
- scoped_ptr<ResourceEntry> entry);
+ void UpdateFileAfterUpdateLocalState(const FileOperationCallback& callback,
+ const base::FilePath* drive_file_path,
+ FileError error);
+ scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
OperationObserver* observer_;
JobScheduler* scheduler_;
internal::ResourceMetadata* metadata_;
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/operations.cc ('k') | chrome/browser/chromeos/drive/file_system/update_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698