| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/indexed_db/indexed_db_dispatcher.h" | 5 #include "content/renderer/indexed_db/indexed_db_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/threading/thread_local.h" | 8 #include "base/threading/thread_local.h" |
| 9 #include "content/common/indexed_db/indexed_db_messages.h" | 9 #include "content/common/indexed_db/indexed_db_messages.h" |
| 10 #include "content/renderer/indexed_db/renderer_webidbcursor_impl.h" | 10 #include "content/renderer/indexed_db/renderer_webidbcursor_impl.h" |
| 11 #include "content/renderer/indexed_db/renderer_webidbdatabase_impl.h" | 11 #include "content/renderer/indexed_db/renderer_webidbdatabase_impl.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 26 using WebKit::WebFrame; | 26 using WebKit::WebFrame; |
| 27 using WebKit::WebIDBCallbacks; | 27 using WebKit::WebIDBCallbacks; |
| 28 using WebKit::WebIDBKeyRange; | 28 using WebKit::WebIDBKeyRange; |
| 29 using WebKit::WebIDBDatabase; | 29 using WebKit::WebIDBDatabase; |
| 30 using WebKit::WebIDBDatabaseCallbacks; | 30 using WebKit::WebIDBDatabaseCallbacks; |
| 31 using WebKit::WebIDBDatabaseError; | 31 using WebKit::WebIDBDatabaseError; |
| 32 using WebKit::WebIDBTransaction; | 32 using WebKit::WebIDBTransaction; |
| 33 using WebKit::WebIDBTransactionCallbacks; | 33 using WebKit::WebIDBTransactionCallbacks; |
| 34 using webkit_glue::WorkerTaskRunner; | 34 using webkit_glue::WorkerTaskRunner; |
| 35 | 35 |
| 36 static base::LazyInstance<ThreadLocalPointer<IndexedDBDispatcher>, | 36 static base::LazyInstance<ThreadLocalPointer<IndexedDBDispatcher> >::Leaky |
| 37 base::LeakyLazyInstanceTraits<ThreadLocalPointer<IndexedDBDispatcher> > > | 37 g_idb_dispatcher_tls = LAZY_INSTANCE_INITIALIZER; |
| 38 g_idb_dispatcher_tls = LAZY_INSTANCE_INITIALIZER; | |
| 39 | 38 |
| 40 namespace { | 39 namespace { |
| 41 | 40 |
| 42 int32 CurrentWorkerId() { | 41 int32 CurrentWorkerId() { |
| 43 return WorkerTaskRunner::Instance()->CurrentWorkerId(); | 42 return WorkerTaskRunner::Instance()->CurrentWorkerId(); |
| 44 } | 43 } |
| 45 | 44 |
| 46 } // unnamed namespace | 45 } // unnamed namespace |
| 47 | 46 |
| 48 IndexedDBDispatcher::IndexedDBDispatcher() { | 47 IndexedDBDispatcher::IndexedDBDispatcher() { |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 } | 679 } |
| 681 | 680 |
| 682 void IndexedDBDispatcher::ResetCursorPrefetchCaches(int32 exception_cursor_id) { | 681 void IndexedDBDispatcher::ResetCursorPrefetchCaches(int32 exception_cursor_id) { |
| 683 typedef std::map<int32, RendererWebIDBCursorImpl*>::iterator Iterator; | 682 typedef std::map<int32, RendererWebIDBCursorImpl*>::iterator Iterator; |
| 684 for (Iterator i = cursors_.begin(); i != cursors_.end(); ++i) { | 683 for (Iterator i = cursors_.begin(); i != cursors_.end(); ++i) { |
| 685 if (i->first == exception_cursor_id) | 684 if (i->first == exception_cursor_id) |
| 686 continue; | 685 continue; |
| 687 i->second->ResetPrefetchCache(); | 686 i->second->ResetPrefetchCache(); |
| 688 } | 687 } |
| 689 } | 688 } |
| OLD | NEW |