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

Side by Side Diff: Source/modules/webdatabase/SQLTransaction.cpp

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2013 Apple 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 void SQLTransaction::performPendingCallback() 247 void SQLTransaction::performPendingCallback()
248 { 248 {
249 computeNextStateAndCleanupIfNeeded(); 249 computeNextStateAndCleanupIfNeeded();
250 runStateMachine(); 250 runStateMachine();
251 } 251 }
252 252
253 void SQLTransaction::executeSQL(const String& sqlStatement, const Vector<SQLValu e>& arguments, PassRefPtr<SQLStatementCallback> callback, PassRefPtr<SQLStatemen tErrorCallback> callbackError, ExceptionCode& e) 253 void SQLTransaction::executeSQL(const String& sqlStatement, const Vector<SQLValu e>& arguments, PassRefPtr<SQLStatementCallback> callback, PassRefPtr<SQLStatemen tErrorCallback> callbackError, ExceptionCode& e)
254 { 254 {
255 if (!m_executeSqlAllowed || !m_database->opened()) { 255 if (!m_executeSqlAllowed || !m_database->opened()) {
256 e = INVALID_STATE_ERR; 256 e = InvalidStateError;
257 return; 257 return;
258 } 258 }
259 259
260 int permissions = DatabaseAuthorizer::ReadWriteMask; 260 int permissions = DatabaseAuthorizer::ReadWriteMask;
261 if (!m_database->databaseContext()->allowDatabaseAccess()) 261 if (!m_database->databaseContext()->allowDatabaseAccess())
262 permissions |= DatabaseAuthorizer::NoAccessMask; 262 permissions |= DatabaseAuthorizer::NoAccessMask;
263 else if (m_readOnly) 263 else if (m_readOnly)
264 permissions |= DatabaseAuthorizer::ReadOnlyMask; 264 permissions |= DatabaseAuthorizer::ReadOnlyMask;
265 265
266 OwnPtr<SQLStatement> statement = SQLStatement::create(m_database.get(), call back, callbackError); 266 OwnPtr<SQLStatement> statement = SQLStatement::create(m_database.get(), call back, callbackError);
(...skipping 25 matching lines...) Expand all
292 292
293 void SQLTransaction::clearCallbackWrappers() 293 void SQLTransaction::clearCallbackWrappers()
294 { 294 {
295 // Release the unneeded callbacks, to break reference cycles. 295 // Release the unneeded callbacks, to break reference cycles.
296 m_callbackWrapper.clear(); 296 m_callbackWrapper.clear();
297 m_successCallbackWrapper.clear(); 297 m_successCallbackWrapper.clear();
298 m_errorCallbackWrapper.clear(); 298 m_errorCallbackWrapper.clear();
299 } 299 }
300 300
301 } // namespace WebCore 301 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/webdatabase/SQLResultSet.cpp ('k') | Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698