unique_id int64 13 189k | target int64 0 1 | code stringlengths 20 241k | __index_level_0__ int64 0 18.9k |
|---|---|---|---|
125,927 | 0 | void InfoBarCountObserver::CheckCount() {
InfoBarTabHelper* infobar_tab_helper =
InfoBarTabHelper::FromWebContents(tab_contents_->web_contents());
if (infobar_tab_helper->GetInfoBarCount() != target_count_)
return;
if (automation_) {
AutomationMsg_WaitForInfoBarCount::WriteReplyParams(reply_message... | 4,400 |
26,783 | 0 | static bool nl80211_valid_auth_type(enum nl80211_auth_type auth_type)
{
return auth_type <= NL80211_AUTHTYPE_MAX;
}
| 4,401 |
11,561 | 0 | int parse_boolean(const char *v) {
assert(v);
if (streq(v, "1") || v[0] == 'y' || v[0] == 'Y' || v[0] == 't' || v[0] == 'T' || !strcasecmp(v, "on"))
return 1;
else if (streq(v, "0") || v[0] == 'n' || v[0] == 'N' || v[0] == 'f' || v[0] == 'F' || !strcasecmp(v, "off"))
... | 4,402 |
122,649 | 0 | PermissionMessages Extension::GetPermissionMessages() const {
base::AutoLock auto_lock(runtime_data_lock_);
if (IsTrustedId(id())) {
return PermissionMessages();
} else {
return runtime_data_.GetActivePermissions()->GetPermissionMessages(
GetType());
}
}
| 4,403 |
115,477 | 0 | void InjectedBundlePage::willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo)
{
static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->willAddMessageToConsole(message, lineNumber);
}
| 4,404 |
11,393 | 0 | fbCombineOverReverseU (CARD32 *dest, const CARD32 *src, int width)
{
int i;
for (i = 0; i < width; ++i) {
CARD32 s = READ(src + i);
CARD32 d = READ(dest + i);
CARD32 ia = Alpha(~READ(dest + i));
FbByteMulAdd(s, ia, d);
WRITE(dest + i, s);
}
}
| 4,405 |
10,659 | 0 | Ins_SCANTYPE( TT_ExecContext exc,
FT_Long* args )
{
if ( args[0] >= 0 )
exc->GS.scan_type = (FT_Int)args[0] & 0xFFFF;
}
| 4,406 |
18,931 | 0 | static void ip_cmsg_recv_ttl(struct msghdr *msg, struct sk_buff *skb)
{
int ttl = ip_hdr(skb)->ttl;
put_cmsg(msg, SOL_IP, IP_TTL, sizeof(int), &ttl);
}
| 4,407 |
155,302 | 0 | ChromeContentBrowserClient::CreateLoginDelegate(
net::AuthChallengeInfo* auth_info,
content::WebContents* web_contents,
const content::GlobalRequestID& request_id,
bool is_request_for_main_frame,
const GURL& url,
scoped_refptr<net::HttpResponseHeaders> response_headers,
bool first_auth_attem... | 4,408 |
48,959 | 0 | static int xmit_one(struct sk_buff *skb, struct net_device *dev,
struct netdev_queue *txq, bool more)
{
unsigned int len;
int rc;
if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all))
dev_queue_xmit_nit(skb, dev);
len = skb->len;
trace_net_dev_start_xmit(skb, dev);
rc = netdev_start_xmit(skb, dev... | 4,409 |
91,666 | 0 | static bool cluster_hash_cmp(const void *p1, const void *p2)
{
const struct cluster_list *cluster1 = p1;
const struct cluster_list *cluster2 = p2;
return (cluster1->length == cluster2->length
&& memcmp(cluster1->list, cluster2->list, cluster1->length)
== 0);
}
| 4,410 |
41,182 | 0 | void tcp_parse_options(const struct sk_buff *skb, struct tcp_options_received *opt_rx,
const u8 **hvpp, int estab)
{
const unsigned char *ptr;
const struct tcphdr *th = tcp_hdr(skb);
int length = (th->doff * 4) - sizeof(struct tcphdr);
ptr = (const unsigned char *)(th + 1);
opt_rx->saw_tstamp = 0;
whil... | 4,411 |
57,999 | 0 | static int nf_tables_table_notify(const struct nft_ctx *ctx, int event)
{
struct sk_buff *skb;
int err;
if (!ctx->report &&
!nfnetlink_has_listeners(ctx->net, NFNLGRP_NFTABLES))
return 0;
err = -ENOBUFS;
skb = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
if (skb == NULL)
goto err;
err = nf_tables_fill_tabl... | 4,412 |
88,883 | 0 | static MagickBooleanType ForwardFourier(const FourierInfo *fourier_info,
Image *image,double *magnitude,double *phase,ExceptionInfo *exception)
{
CacheView
*magnitude_view,
*phase_view;
double
*magnitude_pixels,
*phase_pixels;
Image
*magnitude_image,
*phase_image;
MagickBooleanType
... | 4,413 |
9,764 | 0 | struct http_req_action_kw *action_http_req_custom(const char *kw)
{
if (!LIST_ISEMPTY(&http_req_keywords.list)) {
struct http_req_action_kw_list *kw_list;
int i;
list_for_each_entry(kw_list, &http_req_keywords.list, list) {
for (i = 0; kw_list->kw[i].kw != NULL; i++) {
if (!strcmp(kw, kw_list->kw[i].kw))... | 4,414 |
133,374 | 0 | void WindowTreeHostManager::SetOverscanInsets(
int64_t display_id,
const gfx::Insets& insets_in_dip) {
GetDisplayManager()->SetOverscanInsets(display_id, insets_in_dip);
}
| 4,415 |
144,027 | 0 | png_read_update_info(png_structp png_ptr, png_infop info_ptr)
{
png_debug(1, "in png_read_update_info");
if (png_ptr == NULL)
return;
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
png_read_start_row(png_ptr);
else
png_warning(png_ptr,
"Ignoring extra png_read_update_info() call; row b... | 4,416 |
143,914 | 0 | WebRunnerBrowserMainParts::~WebRunnerBrowserMainParts() {
display::Screen::SetScreenInstance(nullptr);
}
| 4,417 |
124,058 | 0 | void BookmarksIOFunction::SelectFile(ui::SelectFileDialog::Type type) {
if (!BrowserThread::CurrentlyOn(BrowserThread::FILE)) {
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
base::Bind(&BookmarksIOFunction::SelectFile, this, type));
return;
}
base::FilePath default_path;
if (type == u... | 4,418 |
5,204 | 0 | static PHP_GINIT_FUNCTION(pgsql)
{
#if defined(COMPILE_DL_PGSQL) && defined(ZTS)
ZEND_TSRMLS_CACHE_UPDATE;
#endif
memset(pgsql_globals, 0, sizeof(zend_pgsql_globals));
/* Initilize notice message hash at MINIT only */
zend_hash_init_ex(&pgsql_globals->notices, 0, NULL, PHP_PGSQL_NOTICE_PTR_DTOR, 1, 0);
}
| 4,419 |
74,906 | 0 | _warc_find_eoh(const char *buf, size_t bsz)
{
static const char _marker[] = "\r\n\r\n";
const char *hit = xmemmem(buf, bsz, _marker, sizeof(_marker) - 1U);
if (hit != NULL) {
hit += sizeof(_marker) - 1U;
}
return hit;
}
| 4,420 |
136,708 | 0 | Document& FrameSelection::GetDocument() const {
DCHECK(LifecycleContext());
return *LifecycleContext();
}
| 4,421 |
151,915 | 0 | void RenderFrameHostImpl::CreateWebUsbService(
blink::mojom::WebUsbServiceRequest request) {
GetContentClient()->browser()->CreateWebUsbService(this, std::move(request));
}
| 4,422 |
169,923 | 0 | xsltGetNamespace(xsltTransformContextPtr ctxt, xmlNodePtr cur, xmlNsPtr ns,
xmlNodePtr out)
{
if (ns == NULL)
return(NULL);
#ifdef XSLT_REFACTORED
/*
* Namespace exclusion and ns-aliasing is performed at
* compilation-time in the refactored code.
* Additionally, aliasing is not intended... | 4,423 |
102,926 | 0 | TabStripModel* DefaultTabHandler::GetTabStripModel() const {
return model_.get();
}
| 4,424 |
140,240 | 0 | bool BluetoothRemoteGATTServer::RemoveFromActiveAlgorithms(
ScriptPromiseResolver* resolver) {
if (!m_activeAlgorithms.contains(resolver)) {
return false;
}
m_activeAlgorithms.remove(resolver);
return true;
}
| 4,425 |
68,089 | 0 | static char *dex_field_name(RBinDexObj *bin, int fid) {
int cid, tid, type_id;
if (!bin || !bin->fields) {
return NULL;
}
if (fid < 0 || fid >= bin->header.fields_size) {
return NULL;
}
cid = bin->fields[fid].class_id;
if (cid < 0 || cid >= bin->header.types_size) {
return NULL;
}
type_id = bin->fields[f... | 4,426 |
75,385 | 0 | static int opdiv(RAsm *a, ut8 *data, const Opcode *op) {
int l = 0;
if ( op->operands[0].type & OT_QWORD ) {
data[l++] = 0x48;
}
switch (op->operands_count) {
case 1:
if ( op->operands[0].type & OT_WORD ) {
data[l++] = 0x66;
}
if (op->operands[0].type & OT_BYTE) {
data[l++] = 0xf6;
} else {
dat... | 4,427 |
155,811 | 0 | void SupervisedUserService::AddExtensionUpdateRequest(
const std::string& extension_id,
const base::Version& version,
SuccessCallback callback) {
std::string id = GetExtensionRequestId(extension_id, version);
AddPermissionRequestInternal(
base::BindRepeating(CreateExtensionUpdateRequest, id),
... | 4,428 |
104,929 | 0 | ResourceTracker* ResourceTracker::Get() {
if (singleton_override_)
return singleton_override_;
if (!global_tracker_)
global_tracker_ = new ResourceTracker;
return global_tracker_;
}
| 4,429 |
19,100 | 0 | int udp_rcv(struct sk_buff *skb)
{
return __udp4_lib_rcv(skb, &udp_table, IPPROTO_UDP);
}
| 4,430 |
100,194 | 0 | void* STDCALL CPB_Alloc(uint32 size) {
return malloc(size);
}
| 4,431 |
101,388 | 0 | static int64 IdToMetahandle(syncable::BaseTransaction* trans,
const syncable::Id& id) {
syncable::Entry entry(trans, syncable::GET_BY_ID, id);
if (!entry.good())
return kInvalidId;
return entry.Get(syncable::META_HANDLE);
}
| 4,432 |
88,800 | 0 | static void mark(void)
{
struct ifsock *ifs;
LIST_FOREACH(ifs, &il, link) {
if (ifs->out != -1)
ifs->stale = 1;
else
ifs->stale = 0;
}
}
| 4,433 |
46,506 | 0 | int test_gf2m_mod_mul(BIO *bp,BN_CTX *ctx)
{
BIGNUM *a,*b[2],*c,*d,*e,*f,*g,*h;
int i, j, ret = 0;
int p0[] = {163,7,6,3,0,-1};
int p1[] = {193,15,0,-1};
a=BN_new();
b[0]=BN_new();
b[1]=BN_new();
c=BN_new();
d=BN_new();
e=BN_new();
f=BN_new();
g=BN_new();
h=BN_new();
BN_GF2m_arr2poly(p0, b[0]);
BN_GF2... | 4,434 |
137,541 | 0 | bool PrintWebViewHelper::Delegate::IsAskPrintSettingsEnabled() {
return true;
}
| 4,435 |
121,920 | 0 | void ChromeNetworkDelegate::OnRawBytesRead(const net::URLRequest& request,
int bytes_read) {
TRACE_EVENT_ASYNC_STEP_PAST1("net", "URLRequest", &request, "DidRead",
"bytes_read", bytes_read);
performance_monitor::PerformanceMonitor::GetInstanc... | 4,436 |
29,078 | 0 | static void kvm_free_physmem_slot(struct kvm_memory_slot *free,
struct kvm_memory_slot *dont)
{
if (!dont || free->dirty_bitmap != dont->dirty_bitmap)
kvm_destroy_dirty_bitmap(free);
kvm_arch_free_memslot(free, dont);
free->npages = 0;
}
| 4,437 |
17,222 | 0 | OverrideVideoCaptureDeviceFactory(
std::unique_ptr<media::VideoCaptureDeviceFactory> platform_factory) {
return base::WrapUnique(
new VideoCaptureDeviceFactoryLinux(std::move(platform_factory)));
}
| 4,438 |
148,687 | 0 | void SkiaOutputSurfaceImplTest::UnblockMainThread() {
DCHECK(!wait_.IsSignaled());
wait_.Signal();
}
| 4,439 |
121,387 | 0 | void DevToolsWindow::BeforeUnloadFired(content::WebContents* tab,
bool proceed,
bool* proceed_to_fire_unload) {
if (!intercepted_page_beforeunload_) {
if (proceed) {
content::DevToolsManager::GetInstance()->ClientHostClosing(
... | 4,440 |
157,141 | 0 | bool IsStrongEtag(const std::string& etag) {
return etag.size() > 2 && etag[0] == '"';
}
| 4,441 |
4,743 | 0 | user_register (User *user)
{
g_autoptr(GError) error = NULL;
g_autofree gchar *object_path = NULL;
user->system_bus_connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
if (user->system_bus_connection == NULL) {
if (error != NULL)
g_crit... | 4,442 |
171,249 | 0 | void SoundTriggerHwService::CallbackThread::onFirstRef()
{
run("soundTrigger cbk", ANDROID_PRIORITY_URGENT_AUDIO);
}
| 4,443 |
131,323 | 0 | static void customLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
V8TestObjectPython::customLongAttributeAttributeSetterCustom(jsValue, info);
TRACE_EVENT_SET_SAMPLIN... | 4,444 |
91,072 | 0 | void CWebServer::RemoveUsersSessions(const std::string& username, const WebEmSession & exceptSession) {
m_sql.safe_query("DELETE FROM UserSessions WHERE (Username=='%q') and (SessionID!='%q')", username.c_str(), exceptSession.id.c_str());
}
| 4,445 |
28,163 | 0 | static void put_mspel8_mc32_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride)
{
uint8_t halfH[88];
uint8_t halfV[64];
uint8_t halfHV[64];
wmv2_mspel8_h_lowpass(halfH, src-stride, 8, stride, 11);
wmv2_mspel8_v_lowpass(halfV, src+1, 8, stride, 8);
wmv2_mspel8_v_lowpass(halfHV, halfH+8, 8, 8, 8);
... | 4,446 |
170,316 | 0 | void RecordPermissionRevocation(WebUsbPermissionRevoked kind) {
UMA_HISTOGRAM_ENUMERATION("WebUsb.PermissionRevoked", kind,
WEBUSB_PERMISSION_REVOKED_MAX);
}
| 4,447 |
98,109 | 0 | bool RenderView::handleCurrentKeyboardEvent() {
if (edit_commands_.empty())
return false;
WebFrame* frame = webview()->focusedFrame();
if (!frame)
return false;
EditCommands::iterator it = edit_commands_.begin();
EditCommands::iterator end = edit_commands_.end();
bool did_execute_command = false;... | 4,448 |
135,561 | 0 | SpellChecker& Editor::GetSpellChecker() const {
return GetFrame().GetSpellChecker();
}
| 4,449 |
81,915 | 0 | static INLINE void wc_ecc_reset(ecc_key* key)
{
/* make sure required key variables are reset */
key->state = ECC_STATE_NONE;
}
| 4,450 |
77,235 | 0 | handle_desc_stats_request(struct ofconn *ofconn,
const struct ofp_header *request)
{
static const char *default_mfr_desc = "Nicira, Inc.";
static const char *default_hw_desc = "Open vSwitch";
static const char *default_sw_desc = VERSION;
static const char *default_serial_desc =... | 4,451 |
71,253 | 0 | kvm_pfn_t kvm_vcpu_gfn_to_pfn(struct kvm_vcpu *vcpu, gfn_t gfn)
{
return gfn_to_pfn_memslot(kvm_vcpu_gfn_to_memslot(vcpu, gfn), gfn);
}
| 4,452 |
53,662 | 0 | void ip6_datagram_recv_specific_ctl(struct sock *sk, struct msghdr *msg,
struct sk_buff *skb)
{
struct ipv6_pinfo *np = inet6_sk(sk);
struct inet6_skb_parm *opt = IP6CB(skb);
unsigned char *nh = skb_network_header(skb);
if (np->rxopt.bits.rxhlim) {
int hlim = ipv6_hdr(skb)->hop_limit;
put_cmsg(msg, SOL... | 4,453 |
129,643 | 0 | bool AffineTransform::decompose(DecomposedType& decomp) const
{
AffineTransform m(*this);
double sx = xScale();
double sy = yScale();
if (m.a() * m.d() - m.c() * m.b() < 0) {
if (m.a() < m.d())
sx = -sx;
else
sy = -sy;
}
m.scale(1 / sx, 1 / sy);
do... | 4,454 |
114,525 | 0 | bool Send(IPC::Message* message) {
return channel_->Send(message);
}
| 4,455 |
6,626 | 0 | lib_file_open_search_with_no_combine(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p,
const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile,
gx_io_device *iodev, bool starting_arg_file, char *fmode)
{
... | 4,456 |
66,318 | 0 | int yr_re_ast_create(
RE_AST** re_ast)
{
*re_ast = (RE_AST*) yr_malloc(sizeof(RE_AST));
if (*re_ast == NULL)
return ERROR_INSUFFICIENT_MEMORY;
(*re_ast)->flags = 0;
(*re_ast)->root_node = NULL;
return ERROR_SUCCESS;
}
| 4,457 |
140,318 | 0 | bool Editor::deleteSelectionAfterDraggingWithEvents(
Element* dragSource,
DeleteMode deleteMode,
const Position& referenceMovePosition) {
if (!dragSource || !dragSource->isConnected())
return true;
const bool shouldDelete = dispatchBeforeInputEditorCommand(
dragSourc... | 4,458 |
134,785 | 0 | bool EventReaderLibevdevCros::HasCapsLockLed() const {
return has_caps_lock_led_;
}
| 4,459 |
20,071 | 0 | static int hfsplus_unlink(struct inode *dir, struct dentry *dentry)
{
struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb);
struct inode *inode = dentry->d_inode;
struct qstr str;
char name[32];
u32 cnid;
int res;
if (HFSPLUS_IS_RSRC(inode))
return -EPERM;
mutex_lock(&sbi->vh_mutex);
cnid = (u32)(unsigned l... | 4,460 |
38,880 | 0 | dist_lb(PG_FUNCTION_ARGS)
{
#ifdef NOT_USED
LINE *line = PG_GETARG_LINE_P(0);
BOX *box = PG_GETARG_BOX_P(1);
#endif
/* need to think about this one for a while */
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("function \"dist_lb\" not implemented")));
PG_RETURN_NULL();
}
| 4,461 |
151,729 | 0 | void Browser::RunFileChooser(content::RenderFrameHost* render_frame_host,
const content::FileChooserParams& params) {
FileSelectHelper::RunFileChooser(render_frame_host, params);
}
| 4,462 |
89,941 | 0 | process_pa_data_to_key(krb5_context context,
krb5_get_init_creds_ctx *ctx,
krb5_creds *creds,
AS_REQ *a,
AS_REP *rep,
const krb5_krbhst_info *hi,
krb5_keyblock **key)
{
struct pa_info_data paid, *ppaid = NULL;
krb5_error_code ret;
krb5_enctype etype;
... | 4,463 |
62,491 | 0 | ns_cprint(netdissect_options *ndo,
register const u_char *cp)
{
register u_int i;
if (!ND_TTEST2(*cp, 1))
return (NULL);
i = *cp++;
if (fn_printn(ndo, cp, i, ndo->ndo_snapend))
return (NULL);
return (cp + i);
}
| 4,464 |
114,157 | 0 | int TestOpenThread(DWORD thread_id) {
HANDLE thread = ::OpenThread(THREAD_QUERY_INFORMATION,
FALSE, // Do not inherit handles.
thread_id);
if (NULL == thread) {
if (ERROR_ACCESS_DENIED == ::GetLastError()) {
return SBOX_TEST_DENIED;
} el... | 4,465 |
9,735 | 0 | static boolean parse_property( struct translate_ctx *ctx )
{
struct tgsi_full_property prop;
uint property_name;
uint values[8];
uint advance;
char id[64];
if (!eat_white( &ctx->cur )) {
report_error( ctx, "Syntax error" );
return FALSE;
}
if (!parse_identifier( &ctx->cur, id, sizeo... | 4,466 |
63,824 | 0 | httpd_write_fully( int fd, const void* buf, size_t nbytes )
{
int nwritten;
nwritten = 0;
while ( nwritten < nbytes )
{
int r;
r = write( fd, (char*) buf + nwritten, nbytes - nwritten );
if ( r < 0 && ( errno == EINTR || errno == EAGAIN ) )
{
sleep( 1 );
continue;
}
if ( r < 0... | 4,467 |
86,152 | 0 | static void ssl_write_supported_point_formats_ext( mbedtls_ssl_context *ssl,
unsigned char *buf,
size_t *olen )
{
unsigned char *p = buf;
((void) ssl);
if( ( ssl->handshake->cli_exts &
MBEDTLS_TL... | 4,468 |
22,933 | 0 | static void nfs4_fl_copy_lock(struct file_lock *dst, struct file_lock *src)
{
struct nfs4_lock_state *lsp = src->fl_u.nfs4_fl.owner;
dst->fl_u.nfs4_fl.owner = lsp;
atomic_inc(&lsp->ls_count);
}
| 4,469 |
148,612 | 0 | explicit TestResourceDispatcherHostDelegate(bool* saw_override)
: saw_override_(saw_override) {}
| 4,470 |
168,121 | 0 | void ExpectFilledCreditCardYearMonthWithYearMonth(int page_id,
const FormData& filled_form,
int expected_page_id,
bool has_address_fields,
... | 4,471 |
85,359 | 0 | static void adjust_sit_entry_set(struct sit_entry_set *ses,
struct list_head *head)
{
struct sit_entry_set *next = ses;
if (list_is_last(&ses->set_list, head))
return;
list_for_each_entry_continue(next, head, set_list)
if (ses->entry_cnt <= next->entry_cnt)
break;
list_move_tail(&ses->set_list, &nex... | 4,472 |
30,203 | 0 | static __init void ftrace_profile_debugfs(struct dentry *d_tracer)
{
}
| 4,473 |
147,562 | 0 | void V8TestObject::NamedPropertyDeleterCallback(
v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Boolean>& info) {
if (!name->IsString())
return;
const AtomicString& property_name = ToCoreAtomicString(name.As<v8::String>());
test_object_v8_internal::NamedPropertyDeleter(property_name, info);... | 4,474 |
60,461 | 0 | static void flag_free_kv(HtKv *kv) {
free (kv->key);
free (kv);
}
| 4,475 |
81,275 | 0 | static void free_trace_buffer(struct trace_buffer *buf)
{
if (buf->buffer) {
ring_buffer_free(buf->buffer);
buf->buffer = NULL;
free_percpu(buf->data);
buf->data = NULL;
}
}
| 4,476 |
148,086 | 0 | static void VoidMethodDoubleOrDOMStringOrNullArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
ExceptionState exception_state(info.GetIsolate(), ExceptionState::kExecutionContext, "TestObject", "voidMethodDoubleOrDOMStringOrNullArg");
TestObject* impl = V8TestObject::ToImpl(info.Holder());
if (UNLIKE... | 4,477 |
27,157 | 0 | static inline NPUTF8 *npidentifier_cache_get_string_copy(NPIdentifier ident)
{
NPIdentifierInfo *npi = npidentifier_cache_lookup(ident);
if (G_UNLIKELY(npi == NULL || npi->string_len == 0))
return NULL;
return NPW_MemAllocCopy(npi->string_len, npi->u.string);
}
| 4,478 |
155,258 | 0 | static SandboxedHandler* Get() {
static SandboxedHandler* instance = new SandboxedHandler();
return instance;
}
| 4,479 |
171,312 | 0 | status_t OMXCodec::allocateBuffers() {
status_t err = allocateBuffersOnPort(kPortIndexInput);
if (err != OK) {
return err;
}
return allocateBuffersOnPort(kPortIndexOutput);
}
| 4,480 |
141,756 | 0 | void V8Debugger::stepOverStatement()
{
DCHECK(isPaused());
DCHECK(!m_executionState.IsEmpty());
v8::HandleScope handleScope(m_isolate);
v8::Local<v8::Value> argv[] = { m_executionState };
callDebuggerMethod("stepOverStatement", 1, argv);
continueProgram();
}
| 4,481 |
23,356 | 0 | static void encode_fsinfo(struct xdr_stream *xdr, const u32* bitmask, struct compound_hdr *hdr)
{
encode_getattr_three(xdr,
bitmask[0] & nfs4_fsinfo_bitmap[0],
bitmask[1] & nfs4_fsinfo_bitmap[1],
bitmask[2] & nfs4_fsinfo_bitmap[2],
hdr);
}
| 4,482 |
31,129 | 0 | static bool fb_do_apertures_overlap(struct apertures_struct *gena,
struct apertures_struct *hwa)
{
int i, j;
if (!hwa || !gena)
return false;
for (i = 0; i < hwa->count; ++i) {
struct aperture *h = &hwa->ranges[i];
for (j = 0; j < gena->count; ++j) {
struct aperture *g = &gena->ranges[j];
printk... | 4,483 |
186,623 | 1 | InputImeEventRouter* GetInputImeEventRouter(Profile* profile) {
if (!profile)
return nullptr;
return extensions::InputImeEventRouterFactory::GetInstance()->GetRouter(
profile->GetOriginalProfile());
}
| 4,484 |
182,131 | 1 | static int usb_enumerate_device_otg(struct usb_device *udev)
{
int err = 0;
#ifdef CONFIG_USB_OTG
/*
* OTG-aware devices on OTG-capable root hubs may be able to use SRP,
* to wake us after we've powered off VBUS; and HNP, switching roles
* "host" to "peripheral". The OTG descriptor helps figure this out.
*/
if (!udev... | 4,485 |
137,253 | 0 | int Textfield::OnDragUpdated(const ui::DropTargetEvent& event) {
DCHECK(CanDrop(event.data()));
gfx::RenderText* render_text = GetRenderText();
const gfx::Range& selection = render_text->selection();
drop_cursor_position_ = render_text->FindCursorPosition(event.location());
bool in_selection =
!selectio... | 4,486 |
7,484 | 0 | int pt_removexattr(FsContext *ctx, const char *path, const char *name)
{
return local_removexattr_nofollow(ctx, path, name);
}
| 4,487 |
155,381 | 0 | blink::UserAgentMetadata GetUserAgentMetadata() {
blink::UserAgentMetadata metadata;
metadata.brand = version_info::GetProductName();
metadata.full_version = version_info::GetVersionNumber();
metadata.major_version = version_info::GetMajorVersionNumber();
metadata.platform = version_info::GetOSType();
met... | 4,488 |
22,194 | 0 | static int rose_create(struct net *net, struct socket *sock, int protocol,
int kern)
{
struct sock *sk;
struct rose_sock *rose;
if (!net_eq(net, &init_net))
return -EAFNOSUPPORT;
if (sock->type != SOCK_SEQPACKET || protocol != 0)
return -ESOCKTNOSUPPORT;
sk = sk_alloc(net, PF_ROSE, GFP_ATOMIC, &ros... | 4,489 |
58,779 | 0 | int __filemap_fdatawrite_range(struct address_space *mapping, loff_t start,
loff_t end, int sync_mode)
{
int ret;
struct writeback_control wbc = {
.sync_mode = sync_mode,
.nr_to_write = mapping->nrpages * 2,
.range_start = start,
.range_end = end,
};
if (!mapping_cap_writeback_dirty(mapping))
return ... | 4,490 |
152,741 | 0 | std::unique_ptr<HistogramBase> LinearHistogram::PersistentCreate(
const std::string& name,
Sample minimum,
Sample maximum,
const BucketRanges* ranges,
HistogramBase::AtomicCount* counts,
HistogramBase::AtomicCount* logged_counts,
uint32_t counts_size,
HistogramSamples::Metadata* meta,
... | 4,491 |
140,207 | 0 | GaiaCookieManagerService::~GaiaCookieManagerService() {
CancelAll();
DCHECK(requests_.empty());
}
| 4,492 |
7,460 | 0 | QByteArray DBusHelperProxy::performAction(const QString &action, const QByteArray &callerID, QByteArray arguments)
{
if (!responder) {
return ActionReply::NoResponderReply().serialized();
}
if (!m_currentAction.isEmpty()) {
return ActionReply::HelperBusyReply().serialized();
}
... | 4,493 |
138,981 | 0 | void WallpaperManagerBase::ResizeCustomizedDefaultWallpaper(
std::unique_ptr<gfx::ImageSkia> image,
const CustomizedWallpaperRescaledFiles* rescaled_files,
bool* success,
gfx::ImageSkia* small_wallpaper_image,
gfx::ImageSkia* large_wallpaper_image) {
*success = true;
*success &= ResizeAndSaveWa... | 4,494 |
69,686 | 0 | entry_guards_changed(void)
{
entry_guards_changed_for_guard_selection(get_guard_selection_info());
}
| 4,495 |
165,329 | 0 | int32_t guest_instance_id() const { return guest_instance_id_; }
| 4,496 |
117,045 | 0 | BaseSessionService::Handle BaseSessionService::ScheduleGetLastSessionCommands(
InternalGetCommandsRequest* request,
CancelableRequestConsumerBase* consumer) {
scoped_refptr<InternalGetCommandsRequest> request_wrapper(request);
AddRequest(request, consumer);
RunTaskOnBackendThread(
FROM_HERE,
b... | 4,497 |
133,324 | 0 | void PaletteTray::HideBubbleWithView(const views::TrayBubbleView* bubble_view) {
if (bubble_->bubble_view() == bubble_view)
bubble_.reset();
}
| 4,498 |
104,769 | 0 | void NavigationController::RendererDidNavigateToSamePage(
const ViewHostMsg_FrameNavigate_Params& params) {
NavigationEntry* existing_entry = GetEntryWithPageID(
tab_contents_->GetSiteInstance(),
params.page_id);
existing_entry->set_unique_id(pending_entry_->unique_id());
if (existing_entry->upd... | 4,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.