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

Unified Diff: Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp
diff --git a/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp b/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp
index d710340e8e215f1a6a1afc83b160f0f9d7548fca..deb471b661fea6ef5b172393273e4075a3dc49c5 100644
--- a/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp
+++ b/Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp
@@ -42,14 +42,14 @@
namespace WebCore {
-PassRefPtr<Database> WorkerGlobalScopeWebDatabase::openDatabase(WorkerGlobalScope* context, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtr<DatabaseCallback> creationCallback, ExceptionState& exceptionState)
+PassRefPtr<Database> WorkerGlobalScopeWebDatabase::openDatabase(WorkerGlobalScope& context, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtr<DatabaseCallback> creationCallback, ExceptionState& exceptionState)
{
DatabaseManager& dbManager = DatabaseManager::manager();
RefPtr<Database> database;
DatabaseError error = DatabaseError::None;
- if (RuntimeEnabledFeatures::databaseEnabled() && context->securityOrigin()->canAccessDatabase()) {
+ if (RuntimeEnabledFeatures::databaseEnabled() && context.securityOrigin()->canAccessDatabase()) {
String errorMessage;
- database = dbManager.openDatabase(context, name, version, displayName, estimatedSize, creationCallback, error, errorMessage);
+ database = dbManager.openDatabase(&context, name, version, displayName, estimatedSize, creationCallback, error, errorMessage);
ASSERT(database || error != DatabaseError::None);
if (error != DatabaseError::None)
DatabaseManager::throwExceptionForDatabaseError(error, errorMessage, exceptionState);
@@ -60,14 +60,14 @@ PassRefPtr<Database> WorkerGlobalScopeWebDatabase::openDatabase(WorkerGlobalScop
return database.release();
}
-PassRefPtr<DatabaseSync> WorkerGlobalScopeWebDatabase::openDatabaseSync(WorkerGlobalScope* context, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtr<DatabaseCallback> creationCallback, ExceptionState& exceptionState)
+PassRefPtr<DatabaseSync> WorkerGlobalScopeWebDatabase::openDatabaseSync(WorkerGlobalScope& context, const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassOwnPtr<DatabaseCallback> creationCallback, ExceptionState& exceptionState)
{
DatabaseManager& dbManager = DatabaseManager::manager();
RefPtr<DatabaseSync> database;
DatabaseError error = DatabaseError::None;
- if (RuntimeEnabledFeatures::databaseEnabled() && context->securityOrigin()->canAccessDatabase()) {
+ if (RuntimeEnabledFeatures::databaseEnabled() && context.securityOrigin()->canAccessDatabase()) {
String errorMessage;
- database = dbManager.openDatabaseSync(context, name, version, displayName, estimatedSize, creationCallback, error, errorMessage);
+ database = dbManager.openDatabaseSync(&context, name, version, displayName, estimatedSize, creationCallback, error, errorMessage);
ASSERT(database || error != DatabaseError::None);
if (error != DatabaseError::None)
DatabaseManager::throwExceptionForDatabaseError(error, errorMessage, exceptionState);

Powered by Google App Engine
This is Rietveld 408576698