summaryrefslogtreecommitdiffstats
path: root/chrome/browser/api/webdata/web_data_service_consumer.h
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-13 17:06:19 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-13 17:06:19 +0000
commit66769db5458358647d65c09c67e1daf58b1439a1 (patch)
treee4caa3c61245887efafde65f8983d772dd465806 /chrome/browser/api/webdata/web_data_service_consumer.h
parent9d8cfb68c1c0e887773f077c6e12692d69d5a846 (diff)
downloadchromium_src-66769db5458358647d65c09c67e1daf58b1439a1.zip
chromium_src-66769db5458358647d65c09c67e1daf58b1439a1.tar.gz
chromium_src-66769db5458358647d65c09c67e1daf58b1439a1.tar.bz2
Introduce a couple of abstract bases for WebDataService.
WebDataService is really a collection of different services that have a common initialization and some commonality e.g. how to cancel requests, and it's probably best that the interfaces reflect this logical split so that the implementation might some daybe tidied up. Starting this off with a WebDataServiceBase for the common bits, and an AutofillWebData for the Autofill-specific functionalities of WebDataService. Using these interfaces to break Autofill's concrete dependency on WebDataService. TBR=ben@chromium.org BUG=140037 Review URL: https://chromiumcodereview.appspot.com/10908065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156567 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/api/webdata/web_data_service_consumer.h')
-rw-r--r--chrome/browser/api/webdata/web_data_service_consumer.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/chrome/browser/api/webdata/web_data_service_consumer.h b/chrome/browser/api/webdata/web_data_service_consumer.h
new file mode 100644
index 0000000..b42bc30
--- /dev/null
+++ b/chrome/browser/api/webdata/web_data_service_consumer.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_API_WEBDATA_WEB_DATA_SERVICE_CONSUMER_H_
+#define CHROME_BROWSER_API_WEBDATA_WEB_DATA_SERVICE_CONSUMER_H_
+
+#include "chrome/browser/api/webdata/web_data_results.h"
+#include "chrome/browser/api/webdata/web_data_service_base.h"
+
+// All requests to the web data service are asynchronous. When the request has
+// been performed, the data consumer is notified using the following interface.
+class WebDataServiceConsumer {
+ public:
+ // Called when a request is done. h uniquely identifies the request.
+ // result can be NULL, if no result is expected or if the database could
+ // not be opened. The result object is destroyed after this call.
+ virtual void OnWebDataServiceRequestDone(WebDataServiceBase::Handle h,
+ const WDTypedResult* result) = 0;
+
+ protected:
+ virtual ~WebDataServiceConsumer() {}
+};
+
+
+#endif // CHROME_BROWSER_API_WEBDATA_WEB_DATA_SERVICE_CONSUMER_H_