#ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_MOVE_OPERATION_H_
#define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_MOVE_OPERATION_H_
#include <set>
#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 "google_apis/drive/gdata_errorcode.h"
namespace base {
class FilePath;
class SequencedTaskRunner;
}
namespace google_apis {
class ResourceEntry;
}
namespace drive {
class ResourceEntry;
namespace internal {
class ResourceMetadata;
}
namespace file_system {
class OperationObserver;
class MoveOperation {
public:
MoveOperation(base::SequencedTaskRunner* blocking_task_runner,
OperationObserver* observer,
internal::ResourceMetadata* metadata);
~MoveOperation();
void Move(const base::FilePath& src_file_path,
const base::FilePath& dest_file_path,
const FileOperationCallback& callback);
private:
void MoveAfterUpdateLocalState(
const FileOperationCallback& callback,
const std::set<base::FilePath>* changed_directories,
const std::string* local_id,
FileError error);
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
OperationObserver* observer_;
internal::ResourceMetadata* metadata_;
base::WeakPtrFactory<MoveOperation> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(MoveOperation);
};
}
}
#endif