OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_REMOVE_OPERATION_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_REMOVE_OPERATION_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_REMOVE_OPERATION_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_REMOVE_OPERATION_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // | 49 // |
50 // |callback| must not be null. | 50 // |callback| must not be null. |
51 void Remove(const base::FilePath& path, | 51 void Remove(const base::FilePath& path, |
52 bool is_recursive, | 52 bool is_recursive, |
53 const FileOperationCallback& callback); | 53 const FileOperationCallback& callback); |
54 | 54 |
55 private: | 55 private: |
56 // Part of Remove(). Called after CheckLocalState() completion. | 56 // Part of Remove(). Called after CheckLocalState() completion. |
57 void RemoveAfterCheckLocalState(const FileOperationCallback& callback, | 57 void RemoveAfterCheckLocalState(const FileOperationCallback& callback, |
58 const std::string* parent_resource_id, | 58 const std::string* parent_resource_id, |
59 const std::string* local_id, | |
60 const ResourceEntry* entry, | 59 const ResourceEntry* entry, |
61 FileError error); | 60 FileError error); |
62 | 61 |
63 // Part of Remove(). Called after server-side removal is done. | 62 // Part of Remove(). Called after server-side removal is done. |
64 void RemoveAfterUpdateRemoteState( | 63 void RemoveAfterUpdateRemoteState( |
65 const FileOperationCallback& callback, | 64 const FileOperationCallback& callback, |
66 const base::Callback<FileError(base::FilePath*)>& local_update_task, | 65 const base::Callback<FileError(base::FilePath*)>& local_update_task, |
67 google_apis::GDataErrorCode status); | 66 google_apis::GDataErrorCode status); |
68 | 67 |
69 // Part of Remove(). Called after UpdateLocalState() completion. | 68 // Part of Remove(). Called after UpdateLocalState() completion. |
(...skipping 10 matching lines...) Expand all Loading... |
80 // Note: This should remain the last member so it'll be destroyed and | 79 // Note: This should remain the last member so it'll be destroyed and |
81 // invalidate the weak pointers before any other members are destroyed. | 80 // invalidate the weak pointers before any other members are destroyed. |
82 base::WeakPtrFactory<RemoveOperation> weak_ptr_factory_; | 81 base::WeakPtrFactory<RemoveOperation> weak_ptr_factory_; |
83 DISALLOW_COPY_AND_ASSIGN(RemoveOperation); | 82 DISALLOW_COPY_AND_ASSIGN(RemoveOperation); |
84 }; | 83 }; |
85 | 84 |
86 } // namespace file_system | 85 } // namespace file_system |
87 } // namespace drive | 86 } // namespace drive |
88 | 87 |
89 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_REMOVE_OPERATION_H_ | 88 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_REMOVE_OPERATION_H_ |
OLD | NEW |