Transfer serviceworker state during cross site navigations too.
[chromium-blink-merge.git] / base / synchronization / cancellation_flag.cc
blobad3b551169d481e7715f5238ab9a4d81dbe2928a
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/synchronization/cancellation_flag.h"
7 #include "base/logging.h"
9 namespace base {
11 void CancellationFlag::Set() {
12 #if !defined(NDEBUG)
13 DCHECK_EQ(set_on_, PlatformThread::CurrentId());
14 #endif
15 base::subtle::Release_Store(&flag_, 1);
18 bool CancellationFlag::IsSet() const {
19 return base::subtle::Acquire_Load(&flag_) != 0;
22 } // namespace base