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

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

Issue 16068004: drive: Rename file_system::DriveOperations to file_system::Operations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/drive_operations.h
diff --git a/chrome/browser/chromeos/drive/file_system/drive_operations.h b/chrome/browser/chromeos/drive/file_system/drive_operations.h
deleted file mode 100644
index 5355d0e332c712321d8724d9dd793d887861176c..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/drive/file_system/drive_operations.h
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_
-#define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_
-
-#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/chromeos/drive/file_system_interface.h"
-
-namespace base {
-class FilePath;
-class SequencedTaskRunner;
-class Time;
-} // namespace base
-
-namespace google_apis {
-class DriveServiceInterface;
-} // namespace google_apis
-
-namespace drive {
-
-class JobScheduler;
-
-namespace internal {
-class FileCache;
-class ResourceMetadata;
-} // namespace internal
-
-namespace file_system {
-
-class CopyOperation;
-class CreateDirectoryOperation;
-class CreateFileOperation;
-class MoveOperation;
-class OperationObserver;
-class RemoveOperation;
-class SearchOperation;
-class TouchOperation;
-class UpdateOperation;
-
-// Callback for DriveOperations::Search.
-// On success, |error| is FILE_ERROR_OK, and remaining arguments are valid to
-// use.
-// |next_feed| is the URL to fetch the remaining result from the server. Maybe
-// empty if there is no more results.
-// On error, |error| is set to other than FILE_ERROR_OK, and the caller
-// shouldn't use remaining arguments.
-typedef base::Callback<void(FileError error,
- const GURL& next_feed,
- scoped_ptr<std::vector<SearchResultInfo> > result)>
- SearchOperationCallback;
-
-// Passes notifications from Drive operations back to the file system.
-class DriveOperations {
- public:
- DriveOperations();
- ~DriveOperations();
-
- // Allocates the operation objects and initializes the operation pointers.
- void Init(OperationObserver* observer,
- JobScheduler* scheduler,
- internal::ResourceMetadata* metadata,
- internal::FileCache* cache,
- FileSystemInterface* file_system,
- google_apis::DriveServiceInterface* drive_service,
- base::SequencedTaskRunner* blocking_task_runner);
-
- // Wrapper function for create_directory_operation_.
- // |callback| must not be null.
- void CreateDirectory(const base::FilePath& directory_path,
- bool is_exclusive,
- bool is_recursive,
- const FileOperationCallback& callback);
-
- // Wrapper function for create_file_operation_.
- // |callback| must not be null.
- void CreateFile(const base::FilePath& remote_file_path,
- bool is_exclusive,
- const FileOperationCallback& callback);
-
- // Wrapper function for copy_operation_.
- // |callback| must not be null.
- void Copy(const base::FilePath& src_file_path,
- const base::FilePath& dest_file_path,
- const FileOperationCallback& callback);
-
- // Wrapper function for copy_operation_.
- // |callback| must not be null.
- void TransferFileFromRemoteToLocal(const base::FilePath& remote_src_file_path,
- const base::FilePath& local_dest_file_path,
- const FileOperationCallback& callback);
-
- // Wrapper function for copy_operation_.
- // |callback| must not be null.
- void TransferFileFromLocalToRemote(
- const base::FilePath& local_src_file_path,
- const base::FilePath& remote_dest_file_path,
- const FileOperationCallback& callback);
-
- // Wrapper function for move_operation_.
- // |callback| must not be null.
- void Move(const base::FilePath& src_file_path,
- const base::FilePath& dest_file_path,
- const FileOperationCallback& callback);
-
- // Wrapper function for remove_operation_.
- // |callback| must not be null.
- void Remove(const base::FilePath& file_path,
- bool is_recursive,
- const FileOperationCallback& callback);
-
- // Wrapper function for touch_operation_.
- // |callback| must not be null.
- void TouchFile(const base::FilePath& file_path,
- const base::Time& last_access_time,
- const base::Time& last_modified_time,
- const FileOperationCallback& callback);
-
- // Wrapper function for update_operation_.
- // |callback| must not be null.
- void UpdateFileByResourceId(const std::string& resource_id,
- DriveClientContext context,
- const FileOperationCallback& callback);
-
- // Wrapper function for search_operation_.
- // |callback| must not be null.
- void Search(const std::string& search_query,
- const GURL& next_feed,
- const SearchOperationCallback& callback);
-
- private:
- scoped_ptr<CopyOperation> copy_operation_;
- scoped_ptr<CreateDirectoryOperation> create_directory_operation_;
- scoped_ptr<CreateFileOperation> create_file_operation_;
- scoped_ptr<MoveOperation> move_operation_;
- scoped_ptr<RemoveOperation> remove_operation_;
- scoped_ptr<TouchOperation> touch_operation_;
- scoped_ptr<UpdateOperation> update_operation_;
- scoped_ptr<SearchOperation> search_operation_;
-};
-
-} // namespace file_system
-} // namespace drive
-
-#endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_DRIVE_OPERATIONS_H_
« no previous file with comments | « chrome/browser/chromeos/drive/file_system.cc ('k') | chrome/browser/chromeos/drive/file_system/drive_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698