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

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

Issue 332613004: Use IDL argument default values in modules/indexeddb/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « Source/modules/indexeddb/IDBObjectStore.idl ('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 /* 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 bool IDBTransaction::hasPendingActivity() const 294 bool IDBTransaction::hasPendingActivity() const
295 { 295 {
296 // FIXME: In an ideal world, we should return true as long as anyone has a o r can 296 // FIXME: In an ideal world, we should return true as long as anyone has a o r can
297 // get a handle to us or any child request object and any of those ha ve 297 // get a handle to us or any child request object and any of those ha ve
298 // event listeners. This is in order to handle user generated events properly. 298 // event listeners. This is in order to handle user generated events properly.
299 return m_hasPendingActivity && !m_contextStopped; 299 return m_hasPendingActivity && !m_contextStopped;
300 } 300 }
301 301
302 blink::WebIDBTransactionMode IDBTransaction::stringToMode(const String& modeStri ng, ExceptionState& exceptionState) 302 blink::WebIDBTransactionMode IDBTransaction::stringToMode(const String& modeStri ng, ExceptionState& exceptionState)
303 { 303 {
304 if (modeString.isNull() 304 if (modeString == IDBTransaction::modeReadOnly())
305 || modeString == IDBTransaction::modeReadOnly())
306 return blink::WebIDBTransactionModeReadOnly; 305 return blink::WebIDBTransactionModeReadOnly;
307 if (modeString == IDBTransaction::modeReadWrite()) 306 if (modeString == IDBTransaction::modeReadWrite())
308 return blink::WebIDBTransactionModeReadWrite; 307 return blink::WebIDBTransactionModeReadWrite;
309 308
310 exceptionState.throwTypeError("The mode provided ('" + modeString + "') is n ot one of 'readonly' or 'readwrite'."); 309 exceptionState.throwTypeError("The mode provided ('" + modeString + "') is n ot one of 'readonly' or 'readwrite'.");
311 return blink::WebIDBTransactionModeReadOnly; 310 return blink::WebIDBTransactionModeReadOnly;
312 } 311 }
313 312
314 const AtomicString& IDBTransaction::modeToString(blink::WebIDBTransactionMode mo de) 313 const AtomicString& IDBTransaction::modeToString(blink::WebIDBTransactionMode mo de)
315 { 314 {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 event->setTarget(this); 398 event->setTarget(this);
400 eventQueue->enqueueEvent(event); 399 eventQueue->enqueueEvent(event);
401 } 400 }
402 401
403 blink::WebIDBDatabase* IDBTransaction::backendDB() const 402 blink::WebIDBDatabase* IDBTransaction::backendDB() const
404 { 403 {
405 return m_database->backend(); 404 return m_database->backend();
406 } 405 }
407 406
408 } // namespace WebCore 407 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBObjectStore.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698