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

Side by Side Diff: webrtc/base/thread_checker_impl.h

Issue 1613643004: Remove mutable from rtc::CriticalSection members. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « webrtc/base/stream.h ('k') | webrtc/base/thread_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 19 matching lines...) Expand all
30 ~ThreadCheckerImpl(); 30 ~ThreadCheckerImpl();
31 31
32 bool CalledOnValidThread() const; 32 bool CalledOnValidThread() const;
33 33
34 // Changes the thread that is checked for in CalledOnValidThread. This may 34 // Changes the thread that is checked for in CalledOnValidThread. This may
35 // be useful when an object may be created on one thread and then used 35 // be useful when an object may be created on one thread and then used
36 // exclusively on another thread. 36 // exclusively on another thread.
37 void DetachFromThread(); 37 void DetachFromThread();
38 38
39 private: 39 private:
40 mutable CriticalSection lock_; 40 CriticalSection lock_;
41 // This is mutable so that CalledOnValidThread can set it. 41 // This is mutable so that CalledOnValidThread can set it.
42 // It's guarded by |lock_|. 42 // It's guarded by |lock_|.
43 mutable PlatformThreadRef valid_thread_; 43 mutable PlatformThreadRef valid_thread_;
44 }; 44 };
45 45
46 } // namespace rtc 46 } // namespace rtc
47 47
48 #endif // WEBRTC_BASE_THREAD_CHECKER_IMPL_H_ 48 #endif // WEBRTC_BASE_THREAD_CHECKER_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/base/stream.h ('k') | webrtc/base/thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698