Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | /* |
michael@0 | 2 | * Header file of Pure API function declarations. |
michael@0 | 3 | * |
michael@0 | 4 | * Explicitly no copyright. |
michael@0 | 5 | * You may recompile and redistribute these definitions as required. |
michael@0 | 6 | * |
michael@0 | 7 | * Version 1.0 |
michael@0 | 8 | */ |
michael@0 | 9 | |
michael@0 | 10 | #if defined(c_plusplus) || defined(__cplusplus) |
michael@0 | 11 | extern "C" { |
michael@0 | 12 | #endif |
michael@0 | 13 | |
michael@0 | 14 | #define PURE_H_VERSION 1 |
michael@0 | 15 | |
michael@0 | 16 | ////////////////////////////// |
michael@0 | 17 | // API's Specific to Purify // |
michael@0 | 18 | ////////////////////////////// |
michael@0 | 19 | |
michael@0 | 20 | // TRUE when Purify is running. |
michael@0 | 21 | int __cdecl PurifyIsRunning(void) ; |
michael@0 | 22 | // |
michael@0 | 23 | // Print a string to the viewer. |
michael@0 | 24 | // |
michael@0 | 25 | int __cdecl PurePrintf(const char *fmt, ...) ; |
michael@0 | 26 | int __cdecl PurifyPrintf(const char *fmt, ...) ; |
michael@0 | 27 | // |
michael@0 | 28 | // Purify functions for leak and memory-in-use functionalty. |
michael@0 | 29 | // |
michael@0 | 30 | int __cdecl PurifyNewInuse(void) ; |
michael@0 | 31 | int __cdecl PurifyAllInuse(void) ; |
michael@0 | 32 | int __cdecl PurifyClearInuse(void) ; |
michael@0 | 33 | int __cdecl PurifyNewLeaks(void) ; |
michael@0 | 34 | int __cdecl PurifyAllLeaks(void) ; |
michael@0 | 35 | int __cdecl PurifyClearLeaks(void) ; |
michael@0 | 36 | // |
michael@0 | 37 | // Purify functions for handle leakage. |
michael@0 | 38 | // |
michael@0 | 39 | int __cdecl PurifyAllHandlesInuse(void) ; |
michael@0 | 40 | int __cdecl PurifyNewHandlesInuse(void) ; |
michael@0 | 41 | // |
michael@0 | 42 | // Functions that tell you about the state of memory. |
michael@0 | 43 | // |
michael@0 | 44 | int __cdecl PurifyDescribe(void *addr) ; |
michael@0 | 45 | int __cdecl PurifyWhatColors(void *addr, int size) ; |
michael@0 | 46 | // |
michael@0 | 47 | // Functions to test the state of memory. If the memory is not |
michael@0 | 48 | // accessible, an error is signaled just as if there were a memory |
michael@0 | 49 | // reference and the function returns false. |
michael@0 | 50 | // |
michael@0 | 51 | int __cdecl PurifyAssertIsReadable(const void *addr, int size) ; |
michael@0 | 52 | int __cdecl PurifyAssertIsWritable(const void *addr, int size) ; |
michael@0 | 53 | // |
michael@0 | 54 | // Functions to test the state of memory. If the memory is not |
michael@0 | 55 | // accessible, these functions return false. No error is signaled. |
michael@0 | 56 | // |
michael@0 | 57 | int __cdecl PurifyIsReadable(const void *addr, int size) ; |
michael@0 | 58 | int __cdecl PurifyIsWritable(const void *addr, int size) ; |
michael@0 | 59 | int __cdecl PurifyIsInitialized(const void *addr, int size) ; |
michael@0 | 60 | // |
michael@0 | 61 | // Functions to set the state of memory. |
michael@0 | 62 | // |
michael@0 | 63 | void __cdecl PurifyMarkAsInitialized(void *addr, int size) ; |
michael@0 | 64 | void __cdecl PurifyMarkAsUninitialized(void *addr, int size) ; |
michael@0 | 65 | // |
michael@0 | 66 | // Functions to do late detection of ABWs, FMWs, IPWs. |
michael@0 | 67 | // |
michael@0 | 68 | #define PURIFY_HEAP_CRT 0xfffffffe |
michael@0 | 69 | #define PURIFY_HEAP_ALL 0xfffffffd |
michael@0 | 70 | #define PURIFY_HEAP_BLOCKS_LIVE 0x80000000 |
michael@0 | 71 | #define PURIFY_HEAP_BLOCKS_DEFERRED_FREE 0x40000000 |
michael@0 | 72 | #define PURIFY_HEAP_BLOCKS_ALL (PURIFY_HEAP_BLOCKS_LIVE|PURIFY_HEAP_BLOCKS_DEFERRED_FREE) |
michael@0 | 73 | int __cdecl PurifyHeapValidate(unsigned int hHeap, unsigned int dwFlags, const void *addr) ; |
michael@0 | 74 | int __cdecl PurifySetLateDetectScanCounter(int counter); |
michael@0 | 75 | int __cdecl PurifySetLateDetectScanInterval(int seconds); |
michael@0 | 76 | |
michael@0 | 77 | |
michael@0 | 78 | //////////////////////////////// |
michael@0 | 79 | // API's Specific to Quantify // |
michael@0 | 80 | //////////////////////////////// |
michael@0 | 81 | |
michael@0 | 82 | // TRUE when Quantify is running. |
michael@0 | 83 | int __cdecl QuantifyIsRunning(void) ; |
michael@0 | 84 | |
michael@0 | 85 | // |
michael@0 | 86 | // Functions for controlling collection |
michael@0 | 87 | // |
michael@0 | 88 | int __cdecl QuantifyDisableRecordingData(void) ; |
michael@0 | 89 | int __cdecl QuantifyStartRecordingData(void) ; |
michael@0 | 90 | int __cdecl QuantifyStopRecordingData(void) ; |
michael@0 | 91 | int __cdecl QuantifyClearData(void) ; |
michael@0 | 92 | int __cdecl QuantifyIsRecordingData(void) ; |
michael@0 | 93 | |
michael@0 | 94 | // Add a comment to the dataset |
michael@0 | 95 | int __cdecl QuantifyAddAnnotation(char *) ; |
michael@0 | 96 | |
michael@0 | 97 | // Save the current data, creating a "checkpoint" dataset |
michael@0 | 98 | int __cdecl QuantifySaveData(void) ; |
michael@0 | 99 | |
michael@0 | 100 | //////////////////////////////// |
michael@0 | 101 | // API's Specific to Coverage // |
michael@0 | 102 | //////////////////////////////// |
michael@0 | 103 | |
michael@0 | 104 | // TRUE when Coverage is running. |
michael@0 | 105 | int __cdecl CoverageIsRunning(void) ; |
michael@0 | 106 | // |
michael@0 | 107 | // Functions for controlling collection |
michael@0 | 108 | // |
michael@0 | 109 | int __cdecl CoverageDisableRecordingData(void) ; |
michael@0 | 110 | int __cdecl CoverageStartRecordingData(void) ; |
michael@0 | 111 | int __cdecl CoverageStopRecordingData(void) ; |
michael@0 | 112 | int __cdecl CoverageClearData(void) ; |
michael@0 | 113 | int __cdecl CoverageIsRecordingData(void) ; |
michael@0 | 114 | // Add a comment to the dataset |
michael@0 | 115 | int __cdecl CoverageAddAnnotation(char *) ; |
michael@0 | 116 | |
michael@0 | 117 | // Save the current data, creating a "checkpoint" dataset |
michael@0 | 118 | int __cdecl CoverageSaveData(void) ; |
michael@0 | 119 | |
michael@0 | 120 | |
michael@0 | 121 | |
michael@0 | 122 | |
michael@0 | 123 | //////////////////////////////// |
michael@0 | 124 | // API's Specific to Purelock // |
michael@0 | 125 | //////////////////////////////// |
michael@0 | 126 | |
michael@0 | 127 | // TRUE when Purelock is running. |
michael@0 | 128 | int __cdecl PurelockIsRunning(void) ; |
michael@0 | 129 | |
michael@0 | 130 | |
michael@0 | 131 | |
michael@0 | 132 | |
michael@0 | 133 | #if defined(c_plusplus) || defined(__cplusplus) |
michael@0 | 134 | } |
michael@0 | 135 | #endif |