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

Unified Diff: webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h

Issue 1347793005: Replace Atomic32 with webrtc/base/atomicops.h. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix typo Created 5 years, 3 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
Index: webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h
diff --git a/webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h b/webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h
index bddc8099b25388402fb8a8f7e9abe7bb7ffccbf0..9f78eb1930df43c036f71d3edc58af26842f5ef6 100644
--- a/webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h
+++ b/webrtc/modules/desktop_capture/mac/full_screen_chrome_window_detector.h
@@ -13,8 +13,8 @@
#include <ApplicationServices/ApplicationServices.h>
+#include "webrtc/base/atomicops.h"
#include "webrtc/modules/desktop_capture/window_capturer.h"
-#include "webrtc/system_wrappers/interface/atomic32.h"
#include "webrtc/system_wrappers/interface/tick_util.h"
namespace webrtc {
@@ -34,9 +34,9 @@ class FullScreenChromeWindowDetector {
public:
FullScreenChromeWindowDetector();
- void AddRef() { ++ref_count_; }
+ void AddRef() { rtc::AtomicOps::Increment(&ref_count_); }
void Release() {
- if (--ref_count_ == 0)
+ if (rtc::AtomicOps::Decrement(&ref_count_) == 0)
delete this;
}
@@ -51,7 +51,7 @@ class FullScreenChromeWindowDetector {
private:
~FullScreenChromeWindowDetector();
- Atomic32 ref_count_;
+ volatile int ref_count_;
// We cache the last two results of the window list, so
// |previous_window_list_| is taken at least 500ms before the next Capture()

Powered by Google App Engine
This is Rietveld 408576698