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

Side by Side Diff: base/files/file_posix_hooks_internal.h

Issue 676873004: Intercept file Open/Close (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 6 years, 1 month 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
(Empty)
1 // Copyright 2014 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.
4
5 #ifndef BASE_FILES_FILE_POSIX_HOOKS_INTERNAL_H_
6 #define BASE_FILES_FILE_POSIX_HOOKS_INTERNAL_H_
7
8 #include "base/base_export.h"
9
10 namespace base {
11
12 // Define empty hooks for blacklisting file descriptors used in base::File.
13 // These functions should be declared 'weak', i.e. the functions declared in
14 // a default way would have precedence over the weak ones at link time. This
15 // works for both static and dynamic linking.
16 //
17 // With compilers other than GCC/Clang define strong no-op symbols for
18 // simplicity.
19 #if defined(COMPILER_GCC)
20 #define ATTRIBUTE_WEAK __attribute__ ((weak))
21 #else
22 #define ATTRIBUTE_WEAK
23 #endif
24 BASE_EXPORT void ProtectFileDescriptor(int fd) ATTRIBUTE_WEAK;
25 BASE_EXPORT void UnprotectFileDescriptor(int fd) ATTRIBUTE_WEAK;
26 #undef ATTRIBUTE_WEAK
27
28 } // namespace base
29
30 #endif // BASE_FILES_FILE_POSIX_HOOKS_INTERNAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698