| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_TRACKER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_TRACKER_H_ |
| 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_TRACKER_H_ | 6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_TRACKER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 helpers_[helper] = abort_closure; | 52 helpers_[helper] = abort_closure; |
| 53 return base::Bind(&internal::InvokeAndInvalidateHelper<T>::Run, | 53 return base::Bind(&internal::InvokeAndInvalidateHelper<T>::Run, |
| 54 helper->AsWeakPtr(), callback); | 54 helper->AsWeakPtr(), callback); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void AbortAll(); | 57 void AbortAll(); |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 friend class internal::AbortHelper; | 60 friend class internal::AbortHelper; |
| 61 | 61 |
| 62 scoped_ptr<internal::AbortHelper> PassAbortHelper( | 62 std::unique_ptr<internal::AbortHelper> PassAbortHelper( |
| 63 internal::AbortHelper* helper); | 63 internal::AbortHelper* helper); |
| 64 | 64 |
| 65 AbortClosureByHelper helpers_; // Owns AbortHelpers. | 65 AbortClosureByHelper helpers_; // Owns AbortHelpers. |
| 66 | 66 |
| 67 DISALLOW_COPY_AND_ASSIGN(CallbackTracker); | 67 DISALLOW_COPY_AND_ASSIGN(CallbackTracker); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace drive_backend | 70 } // namespace drive_backend |
| 71 } // namespace sync_file_system | 71 } // namespace sync_file_system |
| 72 | 72 |
| 73 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_TRACKER_H_ | 73 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_TRACKER_H_ |
| OLD | NEW |