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

Unified Diff: trunk/src/android_webview/browser/aw_form_database_service.h

Issue 23679005: Revert 221409 "Fix threading issues in aw form database" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/android_webview/browser/aw_form_database_service.h
===================================================================
--- trunk/src/android_webview/browser/aw_form_database_service.h (revision 221422)
+++ trunk/src/android_webview/browser/aw_form_database_service.h (working copy)
@@ -7,14 +7,11 @@
#include "base/basictypes.h"
#include "base/files/file_path.h"
+#include "base/synchronization/waitable_event.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
#include "components/webdata/common/web_data_service_consumer.h"
#include "components/webdata/common/web_database_service.h"
-namespace base {
-class WaitableEvent;
-};
-
namespace android_webview {
// Handles the database operations necessary to implement the autocomplete
@@ -45,16 +42,15 @@
const WDTypedResult* result) OVERRIDE;
private:
- struct PendingQuery {
- bool* result;
- base::WaitableEvent* completion;
- };
- typedef std::map<WebDataServiceBase::Handle, PendingQuery> QueryMap;
+ // Cancels the currently pending WebDataService query, if there is one.
+ void CancelPendingQuery();
- void ClearFormDataImpl();
- void HasFormDataImpl(base::WaitableEvent* completion, bool* result);
+ void HasFormDataImpl();
- QueryMap result_map_;
+ // Stores the query handle when an async database query is executed.
+ WebDataServiceBase::Handle pending_query_handle_;
+ bool has_form_data_;
+ base::WaitableEvent completion_;
scoped_refptr<autofill::AutofillWebDataService> autofill_data_;
scoped_refptr<WebDatabaseService> web_database_;
« no previous file with comments | « trunk/src/android_webview/browser/aw_browser_context.cc ('k') | trunk/src/android_webview/browser/aw_form_database_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698