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

Unified Diff: chrome/browser/sync_file_system/drive_backend/callback_tracker_internal.h.pump

Issue 612693002: [SyncFS] Use variadic template in callback_tracker_internal.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@callback_vararg
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/callback_tracker_internal.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/callback_tracker_internal.h.pump
diff --git a/chrome/browser/sync_file_system/drive_backend/callback_tracker_internal.h.pump b/chrome/browser/sync_file_system/drive_backend/callback_tracker_internal.h.pump
deleted file mode 100644
index 00cb40f9adbf440b43ed277549fb4bdc71c14099..0000000000000000000000000000000000000000
--- a/chrome/browser/sync_file_system/drive_backend/callback_tracker_internal.h.pump
+++ /dev/null
@@ -1,73 +0,0 @@
-$$ This is a pump file for generating file templates. Pump is a python
-$$ script that is part of the Google Test suite of utilities. Description
-$$ can be found here:
-$$
-$$ http://code.google.com/p/googletest/wiki/PumpManual
-$$
-$$ See comment for MAX_ARITY in base/bind.h.pump.
-$var MAX_ARITY = 7
-
-// Copyright 2014 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_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_TRACKER_INTERNAL_H_
-#define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_TRACKER_INTERNAL_H_
-
-#include "base/callback.h"
-#include "base/callback_internal.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
-
-namespace sync_file_system {
-namespace drive_backend {
-
-class CallbackTracker;
-
-namespace internal {
-
-class AbortHelper {
- public:
- explicit AbortHelper(CallbackTracker* tracker);
- ~AbortHelper();
- base::WeakPtr<AbortHelper> AsWeakPtr();
-
- static scoped_ptr<AbortHelper> TakeOwnership(
- const base::WeakPtr<AbortHelper>& abort_helper);
-
- private:
- CallbackTracker* tracker_; // Not owned.
- base::WeakPtrFactory<AbortHelper> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(AbortHelper);
-};
-
-template <typename>
-struct InvokeAndInvalidateHelper;
-
-$range ARITY 0..MAX_ARITY
-$for ARITY [[
-$range ARG 1..ARITY
-
-template <$for ARG , [[typename A$(ARG)]]>
-struct InvokeAndInvalidateHelper<void($for ARG , [[A$(ARG)]])> {
- static void Run(const base::WeakPtr<AbortHelper>& abort_helper,
- const base::Callback<void($for ARG , [[A$(ARG)]])>& callback
-$if ARITY != 0 [[, ]]
-$for ARG , [[A$(ARG) a$(ARG)]]
-) {
- scoped_ptr<AbortHelper> deleter = AbortHelper::TakeOwnership(abort_helper);
- if (deleter) {
- callback.Run(
-$for ARG , [[base::internal::CallbackForward(a$(ARG))]]);
- }
- }
-};
-
-]] $$ for ARITY
-
-} // namespace internal
-} // namespace drive_backend
-} // namespace sync_file_system
-
-#endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_TRACKER_INTERNAL_H_
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/callback_tracker_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698