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.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #ifndef CC_DEBUG_H_ |
michael@0 | 6 | #define CC_DEBUG_H_ |
michael@0 | 7 | #include "cc_types.h" |
michael@0 | 8 | #include <cpr_stdio.h> |
michael@0 | 9 | |
michael@0 | 10 | extern cc_int32_t VCMDebug; |
michael@0 | 11 | extern cc_int32_t PLATDebug; |
michael@0 | 12 | |
michael@0 | 13 | #ifndef PLAT_ERROR |
michael@0 | 14 | #define PLAT_ERROR(format, ...) CSFLogError("plat" , format , ## __VA_ARGS__ ) |
michael@0 | 15 | #endif |
michael@0 | 16 | |
michael@0 | 17 | #ifndef VCM_ERR |
michael@0 | 18 | #define VCM_ERR(format, ...) CSFLogError("vcm" , format , ## __VA_ARGS__ ) |
michael@0 | 19 | #endif |
michael@0 | 20 | |
michael@0 | 21 | #ifndef VCM_DEBUG |
michael@0 | 22 | #define VCM_DEBUG(format, ...) CSFLogDebug("vcm" , format , ## __VA_ARGS__ ) |
michael@0 | 23 | #endif |
michael@0 | 24 | |
michael@0 | 25 | |
michael@0 | 26 | //DEBUG message prefixes |
michael@0 | 27 | #define PLAT_F_PREFIX "PLAT : %s : " |
michael@0 | 28 | #define PLAT_A_F_PREFIX "PLAT : %s : %s :" |
michael@0 | 29 | #define PLAT_L_C_F_PREFIX "PLAT : %d/%d : %s : " // line/call/fname as arg |
michael@0 | 30 | #define VCM_F_PREFIX "VCM : %s : " |
michael@0 | 31 | #define VCM_A_F_PREFIX "VCM : %s : %s :" |
michael@0 | 32 | #define VCM_L_C_F_PREFIX "%s : %d/%d : %s : " // line/call/fname as arg |
michael@0 | 33 | #define PLAT_F_PREFIX_ARGS(msg_name, func_name) msg_name, func_name |
michael@0 | 34 | #define PLAT_L_C_F_PREFIX_ARGS(msg_name, line, call_id, func_name) \ |
michael@0 | 35 | msg_name, line, call_id, func_name |
michael@0 | 36 | |
michael@0 | 37 | |
michael@0 | 38 | // |
michael@0 | 39 | #define PLAT_API "PLAT_API" // platform API |
michael@0 | 40 | #define VCM_API "VCM_API" // vcm api |
michael@0 | 41 | |
michael@0 | 42 | #endif /* CC_DEBUG_H_ */ |