// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/cancellation_flag.h"

#include "base/logging.h"

namespace base {

void CancellationFlag::Set() {
#if !defined(NDEBUG)
  DCHECK_EQ(set_on_, PlatformThread::CurrentId());
#endif
  base::subtle::Release_Store(&flag_, 1);
}

bool CancellationFlag::IsSet() const {
  return base::subtle::Acquire_Load(&flag_) != 0;
}

}  // namespace base

// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/cancellation_flag.h"

#include "base/logging.h"

namespace base {

void CancellationFlag::Set() {
#if !defined(NDEBUG)
  DCHECK(set_on_ == PlatformThread::CurrentId());
#endif
  base::subtle::Release_Store(&flag_, 1);
}

bool CancellationFlag::IsSet() const {
  return base::subtle::Acquire_Load(&flag_) != 0;
}

}  // namespace base

--- 
+++ 
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -10,7 +10,7 @@
 
 void CancellationFlag::Set() {
 #if !defined(NDEBUG)
-  DCHECK(set_on_ == PlatformThread::CurrentId());
+  DCHECK_EQ(set_on_, PlatformThread::CurrentId());
 #endif
   base::subtle::Release_Store(&flag_, 1);
 }
Replace a DCHECK with DCHECK_EQ.

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/2919013

git-svn-id: http://src.chromium.org/svn/trunk/src@52429 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: dc76e08a5d10b0866111ed79414dbafbd247fd96