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

Side by Side Diff: base/threading/non_thread_safe.h

Issue 1076013002: Added stub MediaSourcePlayer for developing behind the flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed WeakPtr usage, disabled thread-safe checks for demuxer's IDMap Created 5 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_THREADING_NON_THREAD_SAFE_H_ 5 #ifndef BASE_THREADING_NON_THREAD_SAFE_H_
6 #define BASE_THREADING_NON_THREAD_SAFE_H_ 6 #define BASE_THREADING_NON_THREAD_SAFE_H_
7 7
8 // Classes deriving from NonThreadSafe may need to suppress MSVC warning 4275: 8 // Classes deriving from NonThreadSafe may need to suppress MSVC warning 4275:
9 // non dll-interface class 'Bar' used as base for dll-interface class 'Foo'. 9 // non dll-interface class 'Bar' used as base for dll-interface class 'Foo'.
10 // There is a specific macro to do it: NON_EXPORTED_BASE(), defined in 10 // There is a specific macro to do it: NON_EXPORTED_BASE(), defined in
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // DCHECK(CalledOnValidThread()); 51 // DCHECK(CalledOnValidThread());
52 // ... (do stuff) ... 52 // ... (do stuff) ...
53 // } 53 // }
54 // } 54 // }
55 // 55 //
56 // Note that base::ThreadChecker offers identical functionality to 56 // Note that base::ThreadChecker offers identical functionality to
57 // NonThreadSafe, but does not require inheritance. In general, it is preferable 57 // NonThreadSafe, but does not require inheritance. In general, it is preferable
58 // to have a base::ThreadChecker as a member, rather than inherit from 58 // to have a base::ThreadChecker as a member, rather than inherit from
59 // NonThreadSafe. For more details about when to choose one over the other, see 59 // NonThreadSafe. For more details about when to choose one over the other, see
60 // the documentation for base::ThreadChecker. 60 // the documentation for base::ThreadChecker.
61 #if ENABLE_NON_THREAD_SAFE 61 #if defined(DISABLE_NON_THREAD_SAFE)
62 typedef NonThreadSafeDoNothing NonThreadSafe;
timav 2015/04/23 23:06:12 Another problem discovered later with the real imp
63 #elif defined(ENABLE_NON_THREAD_SAFE)
62 typedef NonThreadSafeImpl NonThreadSafe; 64 typedef NonThreadSafeImpl NonThreadSafe;
63 #else 65 #else
64 typedef NonThreadSafeDoNothing NonThreadSafe; 66 typedef NonThreadSafeDoNothing NonThreadSafe;
65 #endif // ENABLE_NON_THREAD_SAFE 67 #endif // ENABLE_NON_THREAD_SAFE
66 68
67 #undef ENABLE_NON_THREAD_SAFE 69 #undef ENABLE_NON_THREAD_SAFE
68 70
69 } // namespace base 71 } // namespace base
70 72
71 #endif // BASE_THREADING_NON_THREAD_SAFE_H_ 73 #endif // BASE_THREADING_NON_THREAD_SAFE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698