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

Side by Side Diff: Source/modules/indexeddb/IDBCallbacks.h

Issue 17060008: Add dataLoss property to IDB's upgradeneeded event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add blink API stub for compatibility with and without chromium changes Created 7 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 | 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 16 matching lines...) Expand all
27 */ 27 */
28 28
29 #ifndef IDBCallbacks_h 29 #ifndef IDBCallbacks_h
30 #define IDBCallbacks_h 30 #define IDBCallbacks_h
31 31
32 #include "core/platform/SharedBuffer.h" 32 #include "core/platform/SharedBuffer.h"
33 #include "modules/indexeddb/IDBDatabaseBackendInterface.h" 33 #include "modules/indexeddb/IDBDatabaseBackendInterface.h"
34 #include "modules/indexeddb/IDBDatabaseError.h" 34 #include "modules/indexeddb/IDBDatabaseError.h"
35 #include "modules/indexeddb/IDBKey.h" 35 #include "modules/indexeddb/IDBKey.h"
36 #include "modules/indexeddb/IDBKeyPath.h" 36 #include "modules/indexeddb/IDBKeyPath.h"
37 #include "public/platform/WebIDBCallbacks.h"
37 #include "wtf/RefCounted.h" 38 #include "wtf/RefCounted.h"
38 39
39 namespace WebCore { 40 namespace WebCore {
40 class IDBCursorBackendInterface; 41 class IDBCursorBackendInterface;
41 42
42 class IDBCallbacks : public RefCounted<IDBCallbacks> { 43 class IDBCallbacks : public RefCounted<IDBCallbacks> {
43 public: 44 public:
44 virtual ~IDBCallbacks() { } 45 virtual ~IDBCallbacks() { }
45 46
46 virtual void onError(PassRefPtr<IDBDatabaseError>) = 0; 47 virtual void onError(PassRefPtr<IDBDatabaseError>) = 0;
(...skipping 11 matching lines...) Expand all
58 virtual void onSuccess(int64_t value) = 0; 59 virtual void onSuccess(int64_t value) = 0;
59 60
60 // From IDBFactor.deleteDatabase(), IDBObjectStore/IDBIndex.get(), IDBObject Store.delete(), IDBObjectStore.clear() 61 // From IDBFactor.deleteDatabase(), IDBObjectStore/IDBIndex.get(), IDBObject Store.delete(), IDBObjectStore.clear()
61 virtual void onSuccess() = 0; 62 virtual void onSuccess() = 0;
62 63
63 // From IDBCursor.advance()/continue() 64 // From IDBCursor.advance()/continue()
64 virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, Pa ssRefPtr<SharedBuffer>) = 0; 65 virtual void onSuccess(PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, Pa ssRefPtr<SharedBuffer>) = 0;
65 // From IDBFactory.open()/deleteDatabase() 66 // From IDBFactory.open()/deleteDatabase()
66 virtual void onBlocked(int64_t /* existingVersion */) { ASSERT_NOT_REACHED() ; } 67 virtual void onBlocked(int64_t /* existingVersion */) { ASSERT_NOT_REACHED() ; }
67 // From IDBFactory.open() 68 // From IDBFactory.open()
68 virtual void onUpgradeNeeded(int64_t /* oldVersion */, PassRefPtr<IDBDatabas eBackendInterface>, const IDBDatabaseMetadata&) { ASSERT_NOT_REACHED(); } 69 virtual void onUpgradeNeeded(int64_t /* oldVersion */, PassRefPtr<IDBDatabas eBackendInterface>, const IDBDatabaseMetadata&, WebKit::WebIDBCallbacks::DataLos s dataLoss) { ASSERT_NOT_REACHED(); }
69 virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>, const IDBDat abaseMetadata&) { ASSERT_NOT_REACHED(); } 70 virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>, const IDBDat abaseMetadata&) { ASSERT_NOT_REACHED(); }
70 }; 71 };
71 72
72 } // namespace WebCore 73 } // namespace WebCore
73 74
74 #endif // IDBCallbacks_h 75 #endif // IDBCallbacks_h
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/tests/IDBRequestTest.cpp ('k') | Source/modules/indexeddb/IDBOpenDBRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698