gfx/skia/trunk/src/utils/android/ashmem.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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 * Copyright 2008 The Android Open Source Project
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license that can be
michael@0 5 * found in the LICENSE file.
michael@0 6 */
michael@0 7
michael@0 8 #ifndef _CUTILS_ASHMEM_H
michael@0 9 #define _CUTILS_ASHMEM_H
michael@0 10
michael@0 11 #include <stddef.h>
michael@0 12
michael@0 13 #ifdef __cplusplus
michael@0 14 extern "C" {
michael@0 15 #endif
michael@0 16
michael@0 17 int ashmem_create_region(const char *name, size_t size);
michael@0 18 int ashmem_set_prot_region(int fd, int prot);
michael@0 19
michael@0 20 /**
michael@0 21 * @return ASHMEM_NOT_PURGED if the memory was not purged.
michael@0 22 * ASHMEM_WAS_PURGED if the memory was purged.
michael@0 23 * -1 on error.
michael@0 24 */
michael@0 25 int ashmem_pin_region(int fd, size_t offset, size_t len);
michael@0 26 int ashmem_unpin_region(int fd, size_t offset, size_t len);
michael@0 27 int ashmem_get_size_region(int fd);
michael@0 28 int ashmem_purge_all_caches(int fd);
michael@0 29
michael@0 30 #ifdef __cplusplus
michael@0 31 }
michael@0 32 #endif
michael@0 33
michael@0 34 #ifndef __ASHMEMIOC /* in case someone included <linux/ashmem.h> too */
michael@0 35
michael@0 36 #define ASHMEM_NAME_LEN 256
michael@0 37
michael@0 38 #define ASHMEM_NAME_DEF "dev/ashmem"
michael@0 39
michael@0 40 /* Return values from ASHMEM_PIN: Was the mapping purged while unpinned? */
michael@0 41 #define ASHMEM_NOT_PURGED 0
michael@0 42 #define ASHMEM_WAS_PURGED 1
michael@0 43
michael@0 44 /* Return values from ASHMEM_UNPIN: Is the mapping now pinned or unpinned? */
michael@0 45 #define ASHMEM_IS_UNPINNED 0
michael@0 46 #define ASHMEM_IS_PINNED 1
michael@0 47
michael@0 48 #endif /* ! __ASHMEMIOC */
michael@0 49
michael@0 50 #endif /* _CUTILS_ASHMEM_H */

mercurial