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

Side by Side Diff: content/renderer/renderer_webidbdatabase_impl.cc

Issue 7692006: IndexedDB API cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright presubmit Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/renderer_webidbdatabase_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer_webidbdatabase_impl.h" 5 #include "content/renderer/renderer_webidbdatabase_impl.h"
6 6
7 #include "content/common/indexed_db_messages.h" 7 #include "content/common/indexed_db_messages.h"
8 #include "content/renderer/indexed_db_dispatcher.h" 8 #include "content/renderer/indexed_db_dispatcher.h"
9 #include "content/renderer/render_thread.h" 9 #include "content/renderer/render_thread.h"
10 #include "content/renderer/renderer_webidbobjectstore_impl.h" 10 #include "content/renderer/renderer_webidbobjectstore_impl.h"
11 #include "content/renderer/renderer_webidbtransaction_impl.h" 11 #include "content/renderer/renderer_webidbtransaction_impl.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 WebExceptionCode& ec) { 98 WebExceptionCode& ec) {
99 IndexedDBDispatcher* dispatcher = 99 IndexedDBDispatcher* dispatcher =
100 RenderThread::current()->indexed_db_dispatcher(); 100 RenderThread::current()->indexed_db_dispatcher();
101 dispatcher->RequestIDBDatabaseSetVersion( 101 dispatcher->RequestIDBDatabaseSetVersion(
102 version, callbacks, idb_database_id_, &ec); 102 version, callbacks, idb_database_id_, &ec);
103 } 103 }
104 104
105 WebKit::WebIDBTransaction* RendererWebIDBDatabaseImpl::transaction( 105 WebKit::WebIDBTransaction* RendererWebIDBDatabaseImpl::transaction(
106 const WebDOMStringList& names, 106 const WebDOMStringList& names,
107 unsigned short mode, 107 unsigned short mode,
108 unsigned long timeout,
109 WebExceptionCode& ec) { 108 WebExceptionCode& ec) {
110 std::vector<string16> object_stores; 109 std::vector<string16> object_stores;
111 object_stores.reserve(names.length()); 110 object_stores.reserve(names.length());
112 for (unsigned int i = 0; i < names.length(); ++i) 111 for (unsigned int i = 0; i < names.length(); ++i)
113 object_stores.push_back(names.item(i)); 112 object_stores.push_back(names.item(i));
114 113
115 int transaction_id; 114 int transaction_id;
116 RenderThread::current()->Send( 115 RenderThread::current()->Send(
117 new IndexedDBHostMsg_DatabaseTransaction( 116 new IndexedDBHostMsg_DatabaseTransaction(
118 idb_database_id_, object_stores, mode, 117 idb_database_id_, object_stores, mode,
119 timeout, &transaction_id, &ec)); 118 &transaction_id, &ec));
120 if (!transaction_id) 119 if (!transaction_id)
121 return NULL; 120 return NULL;
122 return new RendererWebIDBTransactionImpl(transaction_id); 121 return new RendererWebIDBTransactionImpl(transaction_id);
123 } 122 }
124 123
125 void RendererWebIDBDatabaseImpl::close() { 124 void RendererWebIDBDatabaseImpl::close() {
126 IndexedDBDispatcher* dispatcher = 125 IndexedDBDispatcher* dispatcher =
127 RenderThread::current()->indexed_db_dispatcher(); 126 RenderThread::current()->indexed_db_dispatcher();
128 dispatcher->RequestIDBDatabaseClose(idb_database_id_); 127 dispatcher->RequestIDBDatabaseClose(idb_database_id_);
129 } 128 }
130 129
131 void RendererWebIDBDatabaseImpl::open(WebIDBDatabaseCallbacks* callbacks) { 130 void RendererWebIDBDatabaseImpl::open(WebIDBDatabaseCallbacks* callbacks) {
132 IndexedDBDispatcher* dispatcher = 131 IndexedDBDispatcher* dispatcher =
133 RenderThread::current()->indexed_db_dispatcher(); 132 RenderThread::current()->indexed_db_dispatcher();
134 dispatcher->RequestIDBDatabaseOpen(callbacks, idb_database_id_); 133 dispatcher->RequestIDBDatabaseOpen(callbacks, idb_database_id_);
135 } 134 }
OLDNEW
« no previous file with comments | « content/renderer/renderer_webidbdatabase_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698