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

Side by Side Diff: chrome/browser/after_startup_task_utils.cc

Issue 2187333002: Loosen/improve AtomicFlag semantics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: side-effects Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "chrome/browser/after_startup_task_utils.h" 5 #include "chrome/browser/after_startup_task_utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 bool AfterStartupTaskUtils::IsBrowserStartupComplete() { 222 bool AfterStartupTaskUtils::IsBrowserStartupComplete() {
223 return ::IsBrowserStartupComplete(); 223 return ::IsBrowserStartupComplete();
224 } 224 }
225 225
226 void AfterStartupTaskUtils::UnsafeResetForTesting() { 226 void AfterStartupTaskUtils::UnsafeResetForTesting() {
227 DCHECK(g_after_startup_tasks.Get().empty()); 227 DCHECK(g_after_startup_tasks.Get().empty());
228 if (!IsBrowserStartupComplete()) 228 if (!IsBrowserStartupComplete())
229 return; 229 return;
230 g_startup_complete_flag.Get().UnsafeResetForTesting(); 230 g_startup_complete_flag.Get().UnsafeReset();
231 DCHECK(!IsBrowserStartupComplete()); 231 DCHECK(!IsBrowserStartupComplete());
232 } 232 }
OLDNEW
« base/synchronization/atomic_flag_unittest.cc ('K') | « base/synchronization/atomic_flag_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698