#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/chromeos/drive/file_errors.h"
-#include "chrome/browser/google_apis/gdata_errorcode.h"
+#include "google_apis/drive/gdata_errorcode.h"
namespace base {
class FilePath;
class ResourceMetadata;
} // namespace internal
-class JobScheduler;
class ResourceEntry;
namespace file_system {
-class OperationObserver;
+class OperationDelegate;
class TouchOperation {
public:
TouchOperation(base::SequencedTaskRunner* blocking_task_runner,
- OperationObserver* observer,
- JobScheduler* scheduler,
+ OperationDelegate* delegate,
internal::ResourceMetadata* metadata);
~TouchOperation();
const FileOperationCallback& callback);
private:
- // Part of TouchFile(). Runs after GetResourceEntry is completed.
- void TouchFileAfterGetResourceEntry(const base::Time& last_access_time,
- const base::Time& last_modified_time,
+ // Part of TouchFile(). Runs after updating the local state.
+ void TouchFileAfterUpdateLocalState(const base::FilePath& file_path,
const FileOperationCallback& callback,
- std::string* local_id,
- ResourceEntry* entry,
+ const ResourceEntry* entry,
+ const std::string* local_id,
FileError error);
- // Part of TouchFile(). Runs after the server side update for last access time
- // and last modified time is completed.
- void TouchFileAfterServerTimeStampUpdated(
- const std::string& local_id,
- const FileOperationCallback& callback,
- google_apis::GDataErrorCode gdata_error,
- scoped_ptr<google_apis::ResourceEntry> resource_entry);
-
- // Part of TouchFile(). Runs after refreshing the local metadata is completed.
- void TouchFileAfterRefreshMetadata(const base::FilePath* file_path,
- const FileOperationCallback& callback,
- FileError error);
-
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
- OperationObserver* observer_;
- JobScheduler* scheduler_;
+ OperationDelegate* delegate_;
internal::ResourceMetadata* metadata_;
// Note: This should remain the last member so it'll be destroyed and