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 
18 namespace base {
19 
20 enum class BlockingType {
21   // The call might block (e.g. file I/O that might hit in memory cache).
22   MAY_BLOCK,
23   // The call will definitely block (e.g. cache already checked and now pinging
24   // server synchronously).
25   WILL_BLOCK
26 };
27 
28 class BASE_EXPORT ScopedBlockingCall {
29  public:
ScopedBlockingCall(const Location & from_here,BlockingType blocking_type)30   ScopedBlockingCall(const Location& from_here, BlockingType blocking_type) {};
~ScopedBlockingCall()31   ~ScopedBlockingCall() {};
32 };
33 
34 namespace internal {
35 
36 class BASE_EXPORT ScopedBlockingCallWithBaseSyncPrimitives {
37  public:
ScopedBlockingCallWithBaseSyncPrimitives(const Location & from_here,BlockingType blocking_type)38   ScopedBlockingCallWithBaseSyncPrimitives(const Location& from_here,
39                                            BlockingType blocking_type) {}
~ScopedBlockingCallWithBaseSyncPrimitives()40   ~ScopedBlockingCallWithBaseSyncPrimitives() {};
41 };
42 
43 }  // namespace internal
44 
45 }  // namespace base
46 
47 #endif  // BASE_THREADING_SCOPED_BLOCKING_CALL_H
48