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

Side by Side Diff: base/memory/raw_scoped_refptr_mismatch_checker.h

Issue 6714032: Move some files in base to base/memory. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: only base Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 BASE_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ 5 #ifndef BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_
6 #define BASE_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ 6 #define BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/template_util.h" 10 #include "base/template_util.h"
11 #include "base/tuple.h" 11 #include "base/tuple.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 13
14 // It is dangerous to post a task with a T* argument where T is a subtype of 14 // It is dangerous to post a task with a T* argument where T is a subtype of
15 // RefCounted(Base|ThreadSafeBase), since by the time the parameter is used, the 15 // RefCounted(Base|ThreadSafeBase), since by the time the parameter is used, the
16 // object may already have been deleted since it was not held with a 16 // object may already have been deleted since it was not held with a
17 // scoped_refptr. Example: http://crbug.com/27191 17 // scoped_refptr. Example: http://crbug.com/27191
18 // The following set of traits are designed to generate a compile error 18 // The following set of traits are designed to generate a compile error
19 // whenever this antipattern is attempted. 19 // whenever this antipattern is attempted.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 NeedsScopedRefptrButGetsRawPtr<E>::value || 120 NeedsScopedRefptrButGetsRawPtr<E>::value ||
121 NeedsScopedRefptrButGetsRawPtr<F>::value || 121 NeedsScopedRefptrButGetsRawPtr<F>::value ||
122 NeedsScopedRefptrButGetsRawPtr<G>::value || 122 NeedsScopedRefptrButGetsRawPtr<G>::value ||
123 NeedsScopedRefptrButGetsRawPtr<H>::value) }; 123 NeedsScopedRefptrButGetsRawPtr<H>::value) };
124 }; 124 };
125 125
126 } // namespace internal 126 } // namespace internal
127 127
128 } // namespace base 128 } // namespace base
129 129
130 #endif // BASE_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_ 130 #endif // BASE_MEMORY_RAW_SCOPED_REFPTR_MISMATCH_CHECKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698