Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(675)

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp

Issue 2776203002: Migrate WTF::Vector::remove() to ::erase() (Closed)
Patch Set: rebase, repatch VectorTest Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 } 501 }
502 502
503 DispatchEventResult IDBDatabase::dispatchEventInternal(Event* event) { 503 DispatchEventResult IDBDatabase::dispatchEventInternal(Event* event) {
504 IDB_TRACE("IDBDatabase::dispatchEvent"); 504 IDB_TRACE("IDBDatabase::dispatchEvent");
505 if (!getExecutionContext()) 505 if (!getExecutionContext())
506 return DispatchEventResult::CanceledBeforeDispatch; 506 return DispatchEventResult::CanceledBeforeDispatch;
507 DCHECK(event->type() == EventTypeNames::versionchange || 507 DCHECK(event->type() == EventTypeNames::versionchange ||
508 event->type() == EventTypeNames::close); 508 event->type() == EventTypeNames::close);
509 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) { 509 for (size_t i = 0; i < m_enqueuedEvents.size(); ++i) {
510 if (m_enqueuedEvents[i].get() == event) 510 if (m_enqueuedEvents[i].get() == event)
511 m_enqueuedEvents.remove(i); 511 m_enqueuedEvents.erase(i);
512 } 512 }
513 513
514 DispatchEventResult dispatchResult = 514 DispatchEventResult dispatchResult =
515 EventTarget::dispatchEventInternal(event); 515 EventTarget::dispatchEventInternal(event);
516 if (event->type() == EventTypeNames::versionchange && !m_closePending && 516 if (event->type() == EventTypeNames::versionchange && !m_closePending &&
517 m_backend) 517 m_backend)
518 m_backend->versionChangeIgnored(); 518 m_backend->versionChangeIgnored();
519 return dispatchResult; 519 return dispatchResult;
520 } 520 }
521 521
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 601
602 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) { 602 void IDBDatabase::recordApiCallsHistogram(IndexedDatabaseMethods method) {
603 DEFINE_THREAD_SAFE_STATIC_LOCAL( 603 DEFINE_THREAD_SAFE_STATIC_LOCAL(
604 EnumerationHistogram, apiCallsHistogram, 604 EnumerationHistogram, apiCallsHistogram,
605 new EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls", 605 new EnumerationHistogram("WebCore.IndexedDB.FrontEndAPICalls",
606 IDBMethodsMax)); 606 IDBMethodsMax));
607 apiCallsHistogram.count(method); 607 apiCallsHistogram.count(method);
608 } 608 }
609 609
610 } // namespace blink 610 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698