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

Unified Diff: base/callback.h

Issue 8846003: Make callback.h include callback_forward.h and add comments about forward declaration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « no previous file | base/callback.h.pump » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/callback.h
diff --git a/base/callback.h b/base/callback.h
index 16e3ee60c51971f87bb914e9e52bf5fd9ddd3091..09c3ef74dfcb24a121322ab75547ce965f9ca62e 100644
--- a/base/callback.h
+++ b/base/callback.h
@@ -11,9 +11,13 @@
#define BASE_CALLBACK_H_
#pragma once
+#include "base/callback_forward.h"
#include "base/callback_internal.h"
#include "base/template_util.h"
+// NOTE: Header files that do not require the full definition of Callback or
+// Closure should #include "base/callback_forward.h" instead of this file.
+
// New, super-duper, unified Callback system. This will eventually replace
// NewRunnableMethod, NewRunnableFunction, CreateFunctor, and CreateCallback
// systems currently in the Chromium code base.
@@ -229,6 +233,9 @@ namespace base {
// After this, create template specializations for 0-7 parameters. Note that
// even though the template typelist grows, the specialization still
// only has one type: the function signature.
+//
+// If you are thinking of forward declaring Callback in your own header file,
+// please include "base/callback_forward.h" instead.
template <typename Sig>
class Callback;
« no previous file with comments | « no previous file | base/callback.h.pump » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698