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

Unified Diff: content/browser/indexed_db/indexed_db_callbacks.h

Issue 119343004: IndexedDB: Simplify data loss code/message routing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git cl format Created 7 years 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
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_callbacks.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_callbacks.h
diff --git a/content/browser/indexed_db/indexed_db_callbacks.h b/content/browser/indexed_db/indexed_db_callbacks.h
index 048b563bf2f24be7fa312648258dfaeeea964fd4..9cf1d41c3dc62181075b7f80022d33461e2d6a74 100644
--- a/content/browser/indexed_db/indexed_db_callbacks.h
+++ b/content/browser/indexed_db/indexed_db_callbacks.h
@@ -57,12 +57,12 @@ class CONTENT_EXPORT IndexedDBCallbacks
virtual void OnBlocked(int64 existing_version);
// IndexedDBFactory::Open
+ virtual void OnDataLoss(blink::WebIDBDataLoss data_loss,
+ std::string data_loss_message);
virtual void OnUpgradeNeeded(
int64 old_version,
scoped_ptr<IndexedDBConnection> connection,
- const content::IndexedDBDatabaseMetadata& metadata,
- blink::WebIDBDataLoss data_loss,
- std::string data_loss_message);
+ const content::IndexedDBDatabaseMetadata& metadata);
virtual void OnSuccess(scoped_ptr<IndexedDBConnection> connection,
const content::IndexedDBDatabaseMetadata& metadata);
@@ -101,6 +101,8 @@ class CONTENT_EXPORT IndexedDBCallbacks
// IndexedDBCursor::Continue / Advance (when complete)
virtual void OnSuccess();
+ blink::WebIDBDataLoss data_loss() const { return data_loss_; }
+
protected:
virtual ~IndexedDBCallbacks();
@@ -120,6 +122,10 @@ class CONTENT_EXPORT IndexedDBCallbacks
GURL origin_url_;
int32 ipc_database_id_;
int32 ipc_database_callbacks_id_;
+
+ // Stored in OnDataLoss, merged with OnUpgradeNeeded response.
+ blink::WebIDBDataLoss data_loss_;
+ std::string data_loss_message_;
};
} // namespace content
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_callbacks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698