Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef CC_DEBUG_H_
6 #define CC_DEBUG_H_
7 #include "cc_types.h"
8 #include <cpr_stdio.h>
10 extern cc_int32_t VCMDebug;
11 extern cc_int32_t PLATDebug;
13 #ifndef PLAT_ERROR
14 #define PLAT_ERROR(format, ...) CSFLogError("plat" , format , ## __VA_ARGS__ )
15 #endif
17 #ifndef VCM_ERR
18 #define VCM_ERR(format, ...) CSFLogError("vcm" , format , ## __VA_ARGS__ )
19 #endif
21 #ifndef VCM_DEBUG
22 #define VCM_DEBUG(format, ...) CSFLogDebug("vcm" , format , ## __VA_ARGS__ )
23 #endif
26 //DEBUG message prefixes
27 #define PLAT_F_PREFIX "PLAT : %s : "
28 #define PLAT_A_F_PREFIX "PLAT : %s : %s :"
29 #define PLAT_L_C_F_PREFIX "PLAT : %d/%d : %s : " // line/call/fname as arg
30 #define VCM_F_PREFIX "VCM : %s : "
31 #define VCM_A_F_PREFIX "VCM : %s : %s :"
32 #define VCM_L_C_F_PREFIX "%s : %d/%d : %s : " // line/call/fname as arg
33 #define PLAT_F_PREFIX_ARGS(msg_name, func_name) msg_name, func_name
34 #define PLAT_L_C_F_PREFIX_ARGS(msg_name, line, call_id, func_name) \
35 msg_name, line, call_id, func_name
38 //
39 #define PLAT_API "PLAT_API" // platform API
40 #define VCM_API "VCM_API" // vcm api
42 #endif /* CC_DEBUG_H_ */