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

Unified Diff: tools/clang/plugins/tests/weak_ptr_factory.h

Issue 26303002: Make Clang plugin check WeakPtrFactory member order (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up for review Created 7 years, 2 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 | « tools/clang/plugins/FindBadConstructs.cpp ('k') | tools/clang/plugins/tests/weak_ptr_factory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/tests/weak_ptr_factory.h
diff --git a/base/process/memory_stubs.cc b/tools/clang/plugins/tests/weak_ptr_factory.h
similarity index 52%
copy from base/process/memory_stubs.cc
copy to tools/clang/plugins/tests/weak_ptr_factory.h
index b06c7d5f2b53ff8d26f1128298f66e544bb23c3a..7aebfc53839cc7a089a3fdd8e1cfb42839a4af68 100644
--- a/base/process/memory_stubs.cc
+++ b/tools/clang/plugins/tests/weak_ptr_factory.h
@@ -2,18 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/process/memory.h"
+#ifndef WEAK_PTR_FACTORY_H_
+#define WEAK_PTR_FACTORY_H_
namespace base {
-void EnableTerminationOnOutOfMemory() {
-}
-
-void EnableTerminationOnHeapCorruption() {
-}
-
-bool AdjustOOMScore(ProcessId process, int score) {
- return false;
-}
+template <typename T>
+class WeakPtrFactory {
+ public:
+ explicit WeakPtrFactory(T*) {}
+};
} // namespace base
+
+#endif // WEAK_PTR_FACTORY_H_
« no previous file with comments | « tools/clang/plugins/FindBadConstructs.cpp ('k') | tools/clang/plugins/tests/weak_ptr_factory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698