scoped_blocking_call.h (1538B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 // This is a dummy version of Chromium source file 8 // base/threading/scoped_blocking_call.h 9 // To provide to a dummy ScopedBlockingCall class. This prevents dependency 10 // creep and we don't use the rest of the blocking call checking. 11 12 #ifndef BASE_THREADING_SCOPED_BLOCKING_CALL_H 13 #define BASE_THREADING_SCOPED_BLOCKING_CALL_H 14 15 #include "base/base_export.h" 16 #include "base/location.h" 17 #include "base/time/time.h" 18 19 namespace base { 20 21 enum class BlockingType { 22 // The call might block (e.g. file I/O that might hit in memory cache). 23 MAY_BLOCK, 24 // The call will definitely block (e.g. cache already checked and now pinging 25 // server synchronously). 26 WILL_BLOCK 27 }; 28 29 class BASE_EXPORT ScopedBlockingCall { 30 public: 31 ScopedBlockingCall(const Location& from_here, BlockingType blocking_type) {}; 32 ~ScopedBlockingCall() {}; 33 }; 34 35 namespace internal { 36 37 class BASE_EXPORT ScopedBlockingCallWithBaseSyncPrimitives { 38 public: 39 ScopedBlockingCallWithBaseSyncPrimitives(const Location& from_here, 40 BlockingType blocking_type) {} 41 ~ScopedBlockingCallWithBaseSyncPrimitives() {}; 42 }; 43 44 } // namespace internal 45 46 } // namespace base 47 48 #endif // BASE_THREADING_SCOPED_BLOCKING_CALL_H