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

Side by Side Diff: Source/modules/indexeddb/IDBFactory.cpp

Issue 78053006: [oilpan] Move IDBDatabase, IDBDatabaseCallbacks, IDBDatabaseBackendInterface and other related clas… (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years 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
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 ec = TypeError; 123 ec = TypeError;
124 return 0; 124 return 0;
125 } 125 }
126 if (!isContextValid(context)) 126 if (!isContextValid(context))
127 return 0; 127 return 0;
128 if (!context->securityOrigin()->canAccessDatabase(context->topOrigin())) { 128 if (!context->securityOrigin()->canAccessDatabase(context->topOrigin())) {
129 ec = SECURITY_ERR; 129 ec = SECURITY_ERR;
130 return 0; 130 return 0;
131 } 131 }
132 132
133 RefPtr<IDBDatabaseCallbacksImpl> databaseCallbacks = IDBDatabaseCallbacksImp l::create(); 133 IDBDatabaseCallbacksImpl* databaseCallbacks = IDBDatabaseCallbacksImpl::crea te();
134 int64_t transactionId = IDBDatabase::nextTransactionId(); 134 int64_t transactionId = IDBDatabase::nextTransactionId();
135 RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(context, databas eCallbacks, transactionId, version); 135 RefPtr<IDBOpenDBRequest> request = IDBOpenDBRequest::create(context, databas eCallbacks, transactionId, version);
136 m_backend->open(name, version, transactionId, request, databaseCallbacks, co ntext->securityOrigin()->databaseIdentifier(), context, getIndexedDBDatabasePath (context)); 136 m_backend->open(name, version, transactionId, request, databaseCallbacks, co ntext->securityOrigin()->databaseIdentifier(), context, getIndexedDBDatabasePath (context));
137 return request; 137 return request;
138 } 138 }
139 139
140 PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext* context, c onst String& name, ExceptionCode& ec) 140 PassRefPtr<IDBOpenDBRequest> IDBFactory::open(ScriptExecutionContext* context, c onst String& name, ExceptionCode& ec)
141 { 141 {
142 IDB_TRACE("IDBFactory::open"); 142 IDB_TRACE("IDBFactory::open");
143 return openInternal(context, name, IDBDatabaseMetadata::NoIntVersion, ec); 143 return openInternal(context, name, IDBDatabaseMetadata::NoIntVersion, ec);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 return static_cast<short>(first->compare(second.get())); 180 return static_cast<short>(first->compare(second.get()));
181 } 181 }
182 182
183 void IDBFactory::trace(Visitor* visitor) 183 void IDBFactory::trace(Visitor* visitor)
184 { 184 {
185 visitor->visit(m_backend); 185 visitor->visit(m_backend);
186 } 186 }
187 187
188 } // namespace WebCore 188 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698