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

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

Issue 325683002: [IndexedDB] Use consistent enums on both sides of IPC. (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
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 25 matching lines...) Expand all
36 #include "core/inspector/ScriptCallStack.h" 36 #include "core/inspector/ScriptCallStack.h"
37 #include "modules/indexeddb/IDBAny.h" 37 #include "modules/indexeddb/IDBAny.h"
38 #include "modules/indexeddb/IDBEventDispatcher.h" 38 #include "modules/indexeddb/IDBEventDispatcher.h"
39 #include "modules/indexeddb/IDBHistograms.h" 39 #include "modules/indexeddb/IDBHistograms.h"
40 #include "modules/indexeddb/IDBIndex.h" 40 #include "modules/indexeddb/IDBIndex.h"
41 #include "modules/indexeddb/IDBKeyPath.h" 41 #include "modules/indexeddb/IDBKeyPath.h"
42 #include "modules/indexeddb/IDBTracing.h" 42 #include "modules/indexeddb/IDBTracing.h"
43 #include "modules/indexeddb/IDBVersionChangeEvent.h" 43 #include "modules/indexeddb/IDBVersionChangeEvent.h"
44 #include "modules/indexeddb/WebIDBDatabaseCallbacksImpl.h" 44 #include "modules/indexeddb/WebIDBDatabaseCallbacksImpl.h"
45 #include "public/platform/Platform.h" 45 #include "public/platform/Platform.h"
46 #include "public/platform/WebIDBKeyPath.h" 46 #include "public/platform/WebIDBKeyPath.h"
jsbell 2014/06/09 16:27:09 Needs to include public/platform/WebIDBTypes.h
Pritam Nikam 2014/06/11 14:07:47 Done.
47 #include "wtf/Atomics.h" 47 #include "wtf/Atomics.h"
48 #include <limits> 48 #include <limits>
49 49
50 using blink::WebIDBDatabase; 50 using blink::WebIDBDatabase;
51 51
52 namespace WebCore { 52 namespace WebCore {
53 53
54 const char IDBDatabase::indexDeletedErrorMessage[] = "The index or its object st ore has been deleted."; 54 const char IDBDatabase::indexDeletedErrorMessage[] = "The index or its object st ore has been deleted.";
55 const char IDBDatabase::isKeyCursorErrorMessage[] = "The cursor is a key cursor. "; 55 const char IDBDatabase::isKeyCursorErrorMessage[] = "The cursor is a key cursor. ";
56 const char IDBDatabase::noKeyOrKeyRangeErrorMessage[] = "No key or key range spe cified."; 56 const char IDBDatabase::noKeyOrKeyRangeErrorMessage[] = "No key or key range spe cified.";
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 IDBTransaction* IDBDatabase::transaction(ExecutionContext* context, const Vector <String>& scope, const String& modeString, ExceptionState& exceptionState) 298 IDBTransaction* IDBDatabase::transaction(ExecutionContext* context, const Vector <String>& scope, const String& modeString, ExceptionState& exceptionState)
299 { 299 {
300 IDB_TRACE("IDBDatabase::transaction"); 300 IDB_TRACE("IDBDatabase::transaction");
301 blink::Platform::current()->histogramEnumeration("WebCore.IndexedDB.FrontEnd APICalls", IDBTransactionCall, IDBMethodsMax); 301 blink::Platform::current()->histogramEnumeration("WebCore.IndexedDB.FrontEnd APICalls", IDBTransactionCall, IDBMethodsMax);
302 if (!scope.size()) { 302 if (!scope.size()) {
303 exceptionState.throwDOMException(InvalidAccessError, "The storeNames par ameter was empty."); 303 exceptionState.throwDOMException(InvalidAccessError, "The storeNames par ameter was empty.");
304 return 0; 304 return 0;
305 } 305 }
306 306
307 blink::WebIDBDatabase::TransactionMode mode = IDBTransaction::stringToMode(m odeString, exceptionState); 307 blink::TransactionMode mode = IDBTransaction::stringToMode(modeString, excep tionState);
308 if (exceptionState.hadException()) 308 if (exceptionState.hadException())
309 return 0; 309 return 0;
310 310
311 if (m_versionChangeTransaction) { 311 if (m_versionChangeTransaction) {
312 exceptionState.throwDOMException(InvalidStateError, "A version change tr ansaction is running."); 312 exceptionState.throwDOMException(InvalidStateError, "A version change tr ansaction is running.");
313 return 0; 313 return 0;
314 } 314 }
315 315
316 if (m_closePending) { 316 if (m_closePending) {
317 exceptionState.throwDOMException(InvalidStateError, "The database connec tion is closing."); 317 exceptionState.throwDOMException(InvalidStateError, "The database connec tion is closing.");
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 { 461 {
462 return EventTargetNames::IDBDatabase; 462 return EventTargetNames::IDBDatabase;
463 } 463 }
464 464
465 ExecutionContext* IDBDatabase::executionContext() const 465 ExecutionContext* IDBDatabase::executionContext() const
466 { 466 {
467 return ActiveDOMObject::executionContext(); 467 return ActiveDOMObject::executionContext();
468 } 468 }
469 469
470 } // namespace WebCore 470 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698