Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
Function
large_stringlengths
11
3.45k
Label
list
Chromium
base/third_party/libevent/test/regress_http.c
static int http_connect(const char *address, u_short port) { /* Stupid code for connecting */ #ifdef WIN32 struct hostent *he; struct sockaddr_in sin; #else struct addrinfo ai, *aitop; char strport[NI_MAXSERV]; #endif struct sockaddr *sa; int slen; int fd; #ifdef WIN32 if (!(he = gethostbyname(addres...
[ 1, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
static void http_errorcb(struct bufferevent *bev, short what, void *arg) { test_ok = -2; event_loopexit(NULL); }
[ 0, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
void http_basic_cb(struct evhttp_request *req, void *arg) { struct evbuffer *evb = evbuffer_new(); int empty = evhttp_find_header(req->input_headers, "Empty") != NULL; event_debug(("%s: called\n", __func__)); evbuffer_add_printf(evb, "This is funny"); { const char *multi = evhttp_find_header(req->input_h...
[ 0, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
static void http_chunked_cb(struct evhttp_request *req, void *arg) { struct timeval when = {0, 0}; struct chunk_req_state *state = malloc(sizeof(struct chunk_req_state)); event_debug(("%s: called\n", __func__)); memset(state, 0, sizeof(struct chunk_req_state)); state->req = req; evhttp_send_reply_start(re...
[ 1, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
static void http_badreq_cb(struct evhttp_request *req, void *arg) { struct evbuffer *buf = evbuffer_new(); evhttp_add_header(req->output_headers, "Content-Type", "text/xml; charset=UTF-8"); evbuffer_add_printf(buf, "Hello, %s!", "127.0.0.1"); evhttp_send_reply(req, HTTP_OK, "OK", buf); ...
[ 1, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
static void http_badreq_errorcb(struct bufferevent *bev, short what, void *arg) { event_debug(("%s: called (what=%04x, arg=%p)", __func__, what, arg)); }
[ 0, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
static void http_badreq_readcb(struct bufferevent *bev, void *arg) { const char *what = "Hello, 127.0.0.1"; const char *bad_request = "400 Bad Request"; event_debug(("%s: %s\n", __func__, EVBUFFER_DATA(bev->input))); if (evbuffer_find(bev->input, (const unsigned char *)bad_request, strlen...
[ 1, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
static void http_delay_reply(int fd, short what, void *arg) { struct evhttp_request *req = arg; evhttp_send_reply(req, HTTP_OK, "Everything is fine", NULL); ++test_ok; }
[ 0, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
void http_request_empty_done(struct evhttp_request *req, void *arg) { if (req->response_code != HTTP_OK) { fprintf(stderr, "FAILED\n"); exit(1); } if (evhttp_find_header(req->input_headers, "Date") == NULL) { fprintf(stderr, "FAILED\n"); exit(1); } if (evhttp_find_header(req->input_headers, ...
[ 0, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
static void close_detect_cb(struct evhttp_request *req, void *arg) { struct evhttp_connection *evcon = arg; struct timeval tv; if (req != NULL && req->response_code != HTTP_OK) { fprintf(stderr, "FAILED\n"); exit(1); } timerclear(&tv); tv.tv_sec = 3; /* launch a new request on the persistent c...
[ 1, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
static void http_parse_query_test(void) { struct evkeyvalq headers; fprintf(stdout, "Testing HTTP query parsing: "); TAILQ_INIT(&headers); evhttp_parse_query("http://www.test.com/?q=test", &headers); if (validate_header(&headers, "q", "test") != 0) goto fail; evhttp_clear_headers(&headers); evhtt...
[ 0, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
static void http_request_bad(struct evhttp_request *req, void *arg) { if (req != NULL) { fprintf(stderr, "FAILED\n"); exit(1); } test_ok = 1; event_loopexit(NULL); }
[ 0, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
static void http_negative_content_length_test(void) { short port = -1; struct evhttp_connection *evcon = NULL; struct evhttp_request *req = NULL; test_ok = 0; fprintf(stdout, "Testing HTTP Negative Content Length: "); http = http_setup(&port, NULL); evcon = evhttp_connection_new("127.0.0.1", port); i...
[ 0, 0 ]
Chromium
base/third_party/libevent/test/regress_http.c
static void terminate_chunked_trickle_cb(int fd, short events, void *arg) { struct terminate_state *state = arg; struct evbuffer *evb = evbuffer_new(); struct timeval tv; if (evhttp_request_get_connection(state->req) == NULL) { test_ok = 1; evhttp_request_free(state->req); event_loopexit(NULL); ...
[ 0, 0 ]
Chromium
base/third_party/libevent/test/regress_rpc.c
static void rpc_basic_test(void) { short port; struct evhttp *http = NULL; struct evrpc_base *base = NULL; struct evhttp_connection *evcon = NULL; struct evhttp_request *req = NULL; fprintf(stdout, "Testing Basic RPC Support: "); rpc_setup(&http, &port, &base); evcon = evhttp_connection_new("127.0.0....
[ 0, 0 ]
Chromium
base/third_party/libevent/test/regress_rpc.c
static void rpc_basic_client(void) { short port; struct evhttp *http = NULL; struct evrpc_base *base = NULL; struct evrpc_pool *pool = NULL; struct msg *msg; struct kill *kill; fprintf(stdout, "Testing RPC Client: "); rpc_setup(&http, &port, &base); need_input_hook = 1; need_output_hook = 1; a...
[ 0, 0 ]
Chromium
base/third_party/libevent/test/test-eof.c
int main(int argc, char **argv) { struct event ev; const char *test = "test string"; int pair[2]; if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) return (1); send(pair[0], test, strlen(test) + 1, 0); shutdown(pair[0], SHUT_WR); event_init(); /* Initalize one event */ event_set(&ev,...
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmime.c
static void xdg_run_command_on_dirs(XdgDirectoryFunc func, void *user_data) { const char *xdg_data_home; const char *xdg_data_dirs; const char *ptr; xdg_data_home = getenv("XDG_DATA_HOME"); if (xdg_data_home) { if ((func)(xdg_data_home, user_data)) return; } else { const char *home; home...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmime.c
const char *xdg_mime_get_mime_type_for_data(const void *data, size_t len, int *result_prio) { const char *mime_type; if (len == 0) { *result_prio = 100; return XDG_MIME_TYPE_EMPTY; } xdg_mime_init(); if (_caches) mime_type = _xdg_mime_cache_get_mime_...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmime.c
const char *xdg_mime_get_mime_type_for_file(const char *file_name, struct stat *statbuf) { const char *mime_type; const char *mime_types[5]; FILE *file; unsigned char *data; int max_extent; int bytes_read; struct stat buf; const char *base_name; int n; i...
[ 1, 1 ]
Chromium
base/third_party/xdg_mime/xdgmime.c
int xdg_mime_is_valid_mime_type(const char *mime_type) { /* FIXME: We should make this a better test */ return _xdg_utf8_validate(mime_type); }
[ 0, 1 ]
Chromium
base/third_party/xdg_mime/xdgmime.c
void xdg_mime_shutdown(void) { XdgCallbackList *list; /* FIXME: Need to make this (and the whole library) thread safe */ if (dir_time_list) { xdg_dir_time_list_free(dir_time_list); dir_time_list = NULL; } if (global_hash) { _xdg_glob_hash_free(global_hash); global_hash = NULL; } if (glob...
[ 1, 1 ]
Chromium
base/third_party/xdg_mime/xdgmime.c
int _xdg_mime_mime_type_subclass(const char *mime, const char *base) { const char *umime, *ubase; const char **parents; if (_caches) return _xdg_mime_cache_mime_type_subclass(mime, base); umime = _xdg_mime_unalias_mime_type(mime); ubase = _xdg_mime_unalias_mime_type(base); if (strcmp(umime, ubase) ==...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmime.c
const char **xdg_mime_get_mime_parents(const char *mime) { const char *umime; xdg_mime_init(); umime = _xdg_mime_unalias_mime_type(mime); return _xdg_mime_parent_list_lookup(parent_list, umime); }
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmime.c
int xdg_mime_register_reload_callback(XdgMimeCallback callback, void *data, XdgMimeDestroy destroy) { XdgCallbackList *list_el; static int callback_id = 1; list_el = calloc(1, sizeof(XdgCallbackList)); list_el->callback_id = callback_id; list_el->callback = callback; l...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmime.c
const char *xdg_mime_get_icon(const char *mime) { xdg_mime_init(); if (_caches) return _xdg_mime_cache_get_icon(mime); return _xdg_mime_icon_list_lookup(icon_list, mime); }
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmime.c
const char *xdg_mime_get_generic_icon(const char *mime) { xdg_mime_init(); if (_caches) return _xdg_mime_cache_get_generic_icon(mime); return _xdg_mime_icon_list_lookup(generic_icon_list, mime); }
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimealias.c
XdgAliasList *_xdg_mime_alias_list_new(void) { XdgAliasList *list; list = malloc(sizeof(XdgAliasList)); list->aliases = NULL; list->n_aliases = 0; return list; }
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimealias.c
void _xdg_mime_alias_read_from_file(XdgAliasList *list, const char *file_name) { FILE *file; char line[255]; int alloc; file = fopen(file_name, "r"); if (file == NULL) return; /* FIXME: Not UTF-8 safe. Doesn't work if lines are greater than 255 chars. * Blah */ alloc = list->n_aliases + 16; l...
[ 1, 1 ]
Chromium
base/third_party/xdg_mime/xdgmimecache.c
void _xdg_mime_cache_unref(XdgMimeCache *cache) { cache->ref_count--; if (cache->ref_count == 0) { #ifdef HAVE_MMAP munmap(cache->buffer, cache->size); #endif free(cache); } }
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimecache.c
XdgMimeCache *_xdg_mime_cache_new_from_file(const char *file_name) { XdgMimeCache *cache = NULL; #ifdef HAVE_MMAP int fd = -1; struct stat st; char *buffer = NULL; int minor; fd = open(file_name, O_RDONLY | _O_BINARY, 0); if (fd < 0) return NULL; if (fstat(fd, &st) < 0 || st.st_size < 4) got...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimecache.c
static const char *cache_alias_lookup(const char *alias) { const char *ptr; int i, min, max, mid, cmp; for (i = 0; _caches[i]; i++) { XdgMimeCache *cache = _caches[i]; xdg_uint32_t list_offset = GET_UINT32(cache->buffer, 4); xdg_uint32_t n_entries = GET_UINT32(cache->buffer, list_offset); xdg_ui...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimecache.c
static int cache_glob_lookup_literal(const char *file_name, const char *mime_types[], int n_mime_types, int case_sensitive_check) { const char *ptr; int i, min, max, mid, cmp; for (i = 0; _caches[i]; i++) { XdgMimeCache *cache = _cach...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimecache.c
static int cache_glob_lookup_fnmatch(const char *file_name, MimeWeight mime_types[], int n_mime_types, int case_sensitive_check) { const char *mime_type; const char *ptr; int i, j, n; n = 0; for (i = 0; _caches[i]; i++) { XdgMimeC...
[ 1, 1 ]
Chromium
base/third_party/xdg_mime/xdgmimecache.c
static int cache_glob_lookup_file_name(const char *file_name, const char *mime_types[], int n_mime_types) { int n; MimeWeight mimes[10]; int n_mimes = 10; int i; int len; char *lower_case; assert(file_name != NULL && n_mime_typ...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimecache.c
int _xdg_mime_cache_get_max_buffer_extents(void) { xdg_uint32_t offset; xdg_uint32_t max_extent; int i; max_extent = 0; for (i = 0; _caches[i]; i++) { XdgMimeCache *cache = _caches[i]; offset = GET_UINT32(cache->buffer, 24); max_extent = MAX(max_extent, GET_UINT32(cache->buffer, offset + 4)); ...
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimecache.c
const char *_xdg_mime_cache_get_mime_type_for_file(const char *file_name, struct stat *statbuf) { const char *mime_type; const char *mime_types[10]; FILE *file; unsigned char *data; int max_extent; int bytes_read; struct stat buf; const char *base_name;...
[ 1, 1 ]
Chromium
base/third_party/xdg_mime/xdgmimecache.c
const char *_xdg_mime_cache_unalias_mime_type(const char *mime) { const char *lookup; lookup = cache_alias_lookup(mime); if (lookup) return lookup; return mime; }
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimecache.c
const char *_xdg_mime_cache_get_icon(const char *mime) { return cache_lookup_icon(mime, 32); }
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimecache.c
void _xdg_mime_cache_glob_dump(void) { int i, j; for (i = 0; _caches[i]; i++) { XdgMimeCache *cache = _caches[i]; xdg_uint32_t list_offset; xdg_uint32_t n_entries; xdg_uint32_t offset; list_offset = GET_UINT32(cache->buffer, 16); n_entries = GET_UINT32(cache->buffer, list_offset); offse...
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimeglob.c
static XdgGlobList *_xdg_glob_list_new(void) { XdgGlobList *new_element; new_element = calloc(1, sizeof(XdgGlobList)); return new_element; }
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimeglob.c
static XdgGlobList *_xdg_glob_list_append(XdgGlobList *glob_list, void *data, const char *mime_type, int weight, int case_sensitive) { XdgGlobList *new_element; XdgGlobList *tmp_element; tmp_element = glob_list; while (tmp_ele...
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimeglob.c
static XdgGlobHashNode *_xdg_glob_hash_node_new(void) { XdgGlobHashNode *glob_hash_node; glob_hash_node = calloc(1, sizeof(XdgGlobHashNode)); return glob_hash_node; }
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimeglob.c
static void _xdg_glob_hash_node_dump(XdgGlobHashNode *glob_hash_node, int depth) { int i; for (i = 0; i < depth; i++) printf(" "); printf("%c", (char)glob_hash_node->character); if (glob_hash_node->mime_type) printf(" - %s %d\n", glob_hash_node->mime_type, glob_has...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimeglob.c
static XdgGlobHashNode * _xdg_glob_hash_insert_text(XdgGlobHashNode *glob_hash_node, const char *text, const char *mime_type, int weight, int case_sensitive) { XdgGlobHashNode *node; xdg_unichar_t *unitext; int len; unitext = _xdg_convert_to_ucs4(text, &len...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimeglob.c
XdgGlobType _xdg_glob_determine_type(const char *glob) { const char *ptr; int maybe_in_simple_glob = FALSE; int first_char = TRUE; ptr = glob; while (*ptr != '\0') { if (*ptr == '*' && first_char) maybe_in_simple_glob = TRUE; else if (*ptr == '\\' || *ptr == '[' || *ptr == '?' || *ptr == '*')...
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimeglob.c
void _xdg_glob_hash_dump(XdgGlobHash *glob_hash) { XdgGlobList *list; printf("LITERAL STRINGS\n"); if (!glob_hash || glob_hash->literal_list == NULL) { printf(" None\n"); } else { for (list = glob_hash->literal_list; list; list = list->next) printf(" %s - %s %d\n", (char *)list->data, list-...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimeicon.c
void _xdg_mime_icon_read_from_file(XdgIconList *list, const char *file_name) { FILE *file; char line[255]; int alloc; file = fopen(file_name, "r"); if (file == NULL) return; /* FIXME: Not UTF-8 safe. Doesn't work if lines are greater than 255 chars. * Blah */ alloc = list->n_icons + 16; list-...
[ 1, 1 ]
Chromium
base/third_party/xdg_mime/xdgmimeint.c
const char *_xdg_get_base_name(const char *file_name) { const char *base_name; if (file_name == NULL) return NULL; base_name = strrchr(file_name, '/'); if (base_name == NULL) return file_name; else return base_name + 1; }
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimeint.c
void _xdg_reverse_ucs4(xdg_unichar_t *source, int len) { xdg_unichar_t c; int i; for (i = 0; i < len - i - 1; i++) { c = source[i]; source[i] = source[len - i - 1]; source[len - i - 1] = c; } }
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimemagic.c
static XdgMimeMagicMatchlet *_xdg_mime_magic_matchlet_new(void) { XdgMimeMagicMatchlet *matchlet; matchlet = malloc(sizeof(XdgMimeMagicMatchlet)); matchlet->indent = 0; matchlet->offset = 0; matchlet->value_length = 0; matchlet->value = NULL; matchlet->mask = NULL; matchlet->range_length = 1; matc...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimemagic.c
static void _xdg_mime_magic_match_free(XdgMimeMagicMatch *mime_magic_match) { XdgMimeMagicMatch *ptr, *next; ptr = mime_magic_match; while (ptr) { next = ptr->next; if (ptr->mime_type) free((void *)ptr->mime_type); if (ptr->matchlet) _xdg_mime_magic_matchlet_free(ptr->matchlet); free...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimemagic.c
int _xdg_mime_magic_get_buffer_extents(XdgMimeMagic *mime_magic) { return mime_magic->max_extent; }
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimemagic.c
static void _xdg_mime_update_mime_magic_extents(XdgMimeMagic *mime_magic) { XdgMimeMagicMatch *match; int max_extent = 0; for (match = mime_magic->match_list; match; match = match->next) { XdgMimeMagicMatchlet *matchlet; for (matchlet = match->matchlet; matchlet; matchlet = matchlet->next) { int ...
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimeparent.c
void _xdg_mime_parent_list_free(XdgParentList *list) { int i; char **p; if (list->parents) { for (i = 0; i < list->n_mimes; i++) { for (p = list->parents[i].parents; *p; p++) free(*p); free(list->parents[i].parents); free(list->parents[i].mime); } free(list->parents); } ...
[ 1, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimeparent.c
static int parent_entry_cmp(const void *v1, const void *v2) { return strcmp(((XdgMimeParents *)v1)->mime, ((XdgMimeParents *)v2)->mime); }
[ 0, 0 ]
Chromium
base/third_party/xdg_mime/xdgmimeparent.c
void _xdg_mime_parent_list_dump(XdgParentList *list) { int i; char **p; if (list->parents) { for (i = 0; i < list->n_mimes; i++) { for (p = list->parents[i].parents; *p; p++) printf("%s %s\n", list->parents[i].mime, *p); } } }
[ 0, 0 ]
Chromium
base/win/vector.h
IFACEMETHODIMP IndexOf(AbiT value, unsigned *index, boolean *found) override { auto iter = std::find_if(vector_.begin(), vector_.end(), [&value](const StorageT &elem) { return internal::IsEqual(elem, value); });
[ 0, 0 ]
Chromium
base/win/vector.h
IFACEMETHODIMP Clear() override { vector_.clear(); NotifyVectorChanged( ABI::Windows::Foundation::Collections::CollectionChange_Reset, 0); return S_OK; }
[ 0, 0 ]
Chromium
base/win/vector.h
IFACEMETHODIMP ReplaceAll(unsigned count, AbiT *value) override { vector_.assign(value, std::next(value, count)); NotifyVectorChanged( ABI::Windows::Foundation::Collections::CollectionChange_Reset, 0); return S_OK; }
[ 0, 0 ]
Chromium
cc/animation/scroll_timeline.h
inline ScrollTimeline *ToScrollTimeline(AnimationTimeline *timeline) { DCHECK(timeline->IsScrollTimeline()); return static_cast<ScrollTimeline *>(timeline); }
[ 0, 0 ]
Chromium
cc/tiles/tile_manager.h
void CheckIfMoreTilesNeedToBePreparedForTesting() { CheckIfMoreTilesNeedToBePrepared(); }
[ 0, 0 ]
Chromium
cc/tiles/tile_manager.h
void SetMoreTilesNeedToBeRasterizedForTesting() { all_tiles_that_need_to_be_rasterized_are_scheduled_ = false; }
[ 0, 0 ]
Chromium
cc/tiles/tile_manager.h
DecodedImageTracker &decoded_image_tracker() { return decoded_image_tracker_; }
[ 0, 0 ]
Chromium
cc/tiles/tile_manager.h
void set_active_url(const GURL &url) { active_url_ = url; }
[ 0, 0 ]
Chromium
chrome/browser/chromeos/arc/accessibility/arc_accessibility_util.h
template <class InfoDataType, class PropType> bool HasNonEmptyStringProperty(InfoDataType *node, PropType prop) { if (!node || !node->string_properties) return false; auto it = node->string_properties->find(prop); if (it == node->string_properties->end()) return false; return !it->second.empty(); }
[ 0, 0 ]
Chromium
chrome/browser/thumbnail/cc/scoped_ptr_expiring_cache.h
void EvictIfFull() { while (map_.size() > max_cache_size_) { iterator it = map_.begin(); delete it->second; map_.erase(it); } }
[ 0, 0 ]
Chromium
chrome/browser/webshare/win/fake_iasync_operation_with_progress.h
IFACEMETHODIMP get_ErrorCode(HRESULT *error_code) final { *error_code = error_code_; return S_OK; }
[ 0, 0 ]
Chromium
chrome/browser/webshare/win/fake_iasync_operation_with_progress.h
IFACEMETHODIMP Close() final { NOTREACHED(); return E_NOTIMPL; }
[ 0, 0 ]
Chromium
chrome/browser/webshare/win/fake_iasync_operation_with_progress.h
void CompleteWithError(HRESULT error_code) { error_code_ = error_code; status_ = AsyncStatus::Error; InvokeCompletedHandler(); }
[ 0, 0 ]
Chromium
chrome/installer/mac/third_party/bsdiff/goobsdiff.c
static inline void offtout(off_t x, u_char *buf) { *((off_t *)buf) = htole64(x); }
[ 0, 0 ]
Chromium
chrome/installer/mac/third_party/bsdiff/goobspatch.c
static lzma_ret xzclose(xzfile *xzf) { lzma_ret lzma_err = LZMA_OK; lzma_end(&xzf->ls); if (fclose(xzf->f) != 0) lzma_err = LZMA_STREAM_END; free(xzf); return lzma_err; }
[ 1, 0 ]
Chromium
chrome/installer/mac/third_party/bsdiff/goobspatch.c
static void cfopen(cfile *cf, const char *path, off_t off, const char *tag, unsigned char method) { int fd; int bz2_err, gz_err; lzma_ret lzma_err; if (method == 1 || method == 2 || method == 4) { if ((cf->f = fopen(path, "rb")) == NULL) err(1, "fdopen(%s)", tag); if ((fseeko(...
[ 1, 0 ]
Chromium
chrome/test/data/nacl/nonsfi/libc_free.c
static void DidChangeView(PP_Instance instance, const struct PP_Rect *position, const struct PP_Rect *clip) {}
[ 0, 0 ]
Chromium
chrome/test/data/nacl/nonsfi/libc_free.c
static PP_Bool HandleDocumentLoad(PP_Instance instance, PP_Resource url_loader) { return 0; }
[ 0, 0 ]
Chromium
chrome/test/data/nacl/nonsfi/libc_free.c
static int32_t MyPPP_InitializeModule(PP_Module module_id, PPB_GetInterface get_browser_interface) { ppb_messaging = get_browser_interface(PPB_MESSAGING_INTERFACE_1_0); ppb_var = get_browser_interface(PPB_VAR_INTERFACE_1_2); return PP_OK; }
[ 0, 0 ]
Chromium
chrome/test/data/nacl/nonsfi/libc_free.c
static void HandleMessage(PP_Instance instance, struct PP_Var message) { if (!ppb_messaging || !ppb_var || message.type != PP_VARTYPE_STRING) { __libnacl_irt_basic.exit(1); } uint32_t message_len; const char *message_string = ppb_var->VarToUtf8(message, &message_len); if (!my_strncmp("Message from Javas...
[ 1, 0 ]
Chromium
chrome/test/data/safe_browsing/mach_o/src.c
int DoAThing() { return 42; }
[ 0, 0 ]
Chromium
components/arc/mojom/ime_mojom_traits.h
static bool is_shift_down(const KeyEventUniquePtr &key_event) { return key_event->IsShiftDown(); }
[ 0, 0 ]
Chromium
components/arc/mojom/ime_mojom_traits.h
static bool is_alt_down(const KeyEventUniquePtr &key_event) { return key_event->IsAltDown(); }
[ 0, 0 ]
Chromium
components/arc/test/connection_holder_util.h
template <typename InstanceType, typename HostType> void WaitForInstanceReady(ConnectionHolder<InstanceType, HostType> *holder) { if (holder->IsConnected()) return; base::RunLoop run_loop; internal::ReadinessObserver<InstanceType, HostType> readiness_observer( holder, run_loop.QuitClosure()); run_loo...
[ 0, 0 ]
Chromium
components/dbus/properties/types.h
class COMPONENT_EXPORT(DBUS) DbusType { public: virtual ~DbusType(); bool operator==(const DbusType &other) const; bool operator!=(const DbusType &other) const; virtual void Write(dbus::MessageWriter *writer) const = 0; // Both a virtual and a static version of GetSignature() are necessary. // The virtua...
[ 0, 0 ]
Chromium
components/guest_view/browser/guest_view.h
void SetOpener(T *opener) { GuestViewBase::SetOpener(opener); }
[ 0, 0 ]
Chromium
components/omnibox/browser/base_search_provider.h
void set_field_trial_triggered(bool triggered) { field_trial_triggered_ = triggered; }
[ 0, 0 ]
Chromium
components/omnibox/browser/base_search_provider.h
void set_field_trial_triggered_in_session(bool triggered) { field_trial_triggered_in_session_ = triggered; }
[ 0, 0 ]
Chromium
components/os_crypt/key_storage_linux.h
class COMPONENT_EXPORT(OS_CRYPT) KeyStorageLinux { public: KeyStorageLinux() = default; virtual ~KeyStorageLinux() = default; static COMPONENT_EXPORT(OS_CRYPT) std::unique_ptr<KeyStorageLinux> CreateService( const os_crypt::Config &config); // Gets the encryption key from the OS password-manag...
[ 0, 0 ]
Chromium
components/performance_manager/test_support/graph_test_harness.h
void reset() { impl_ = nullptr; }
[ 0, 0 ]
Chromium
components/signin/internal/identity_manager/gaia_cookie_manager_service.h
ExternalCcResultFetcher *external_cc_result_fetcher_for_testing() { return &external_cc_result_fetcher_; }
[ 0, 0 ]
Chromium
courgette/memory_allocator.h
CheckBool push_back(const T &item) WARN_UNUSED_RESULT { return append(&item, 1); }
[ 0, 0 ]
Chromium
courgette/patch_generator_x86_32.h
Status Reform(SourceStreamSet *transformed_element, SinkStream *reformed_element) { return TransformationPatchGenerator::Reform(transformed_element, reformed_element); }
[ 0, 0 ]
Chromium
extensions/browser/extension_function.h
void set_source_url(const GURL &source_url) { source_url_ = source_url; }
[ 0, 0 ]
Chromium
extensions/browser/extension_function.h
void set_include_incognito_information(bool include) { include_incognito_information_ = include; }
[ 0, 0 ]
Chromium
extensions/browser/extension_function.h
void set_user_gesture(bool user_gesture) { user_gesture_ = user_gesture; }
[ 0, 0 ]
Chromium
extensions/browser/extension_function.h
void set_source_process_id(int source_process_id) { source_process_id_ = source_process_id; }
[ 0, 0 ]
Chromium
gpu/command_buffer/client/gles2_cmd_helper_autogen.h
void ActiveTexture(GLenum texture) { gles2::cmds::ActiveTexture *c = GetCmdSpace<gles2::cmds::ActiveTexture>(); if (c) { c->Init(texture); } }
[ 1, 0 ]
Chromium
gpu/command_buffer/client/gles2_cmd_helper_autogen.h
void BindBuffer(GLenum target, GLuint buffer) { gles2::cmds::BindBuffer *c = GetCmdSpace<gles2::cmds::BindBuffer>(); if (c) { c->Init(target, buffer); } }
[ 1, 0 ]
Chromium
gpu/command_buffer/client/gles2_cmd_helper_autogen.h
void BindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { gles2::cmds::BindBufferRange *c = GetCmdSpace<gles2::cmds::BindBufferRange>(); if (c) { c->Init(target, index, buffer, offset, size); } }
[ 1, 0 ]
Chromium
gpu/command_buffer/client/gles2_cmd_helper_autogen.h
void BindRenderbuffer(GLenum target, GLuint renderbuffer) { gles2::cmds::BindRenderbuffer *c = GetCmdSpace<gles2::cmds::BindRenderbuffer>(); if (c) { c->Init(target, renderbuffer); } }
[ 0, 0 ]
Chromium
gpu/command_buffer/client/gles2_cmd_helper_autogen.h
void BindSampler(GLuint unit, GLuint sampler) { gles2::cmds::BindSampler *c = GetCmdSpace<gles2::cmds::BindSampler>(); if (c) { c->Init(unit, sampler); } }
[ 1, 0 ]
Chromium
gpu/command_buffer/client/gles2_cmd_helper_autogen.h
void BindTexture(GLenum target, GLuint texture) { gles2::cmds::BindTexture *c = GetCmdSpace<gles2::cmds::BindTexture>(); if (c) { c->Init(target, texture); } }
[ 1, 0 ]