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

Unified Diff: chrome/browser/api/webdata/web_data_service_base.h

Issue 10908065: Introduce a couple of abstract bases for WebDataService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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: chrome/browser/api/webdata/web_data_service_base.h
diff --git a/chrome/browser/api/webdata/web_data_service_base.h b/chrome/browser/api/webdata/web_data_service_base.h
new file mode 100644
index 0000000000000000000000000000000000000000..88b3084b422fc7d81af1c0eb385290b4fea70a05
--- /dev/null
+++ b/chrome/browser/api/webdata/web_data_service_base.h
@@ -0,0 +1,30 @@
+// 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_BASE_H_
+#define CHROME_BROWSER_API_WEBDATA_WEB_DATA_SERVICE_BASE_H_
+
+#include "chrome/browser/profiles/refcounted_profile_keyed_service.h"
+
+class Profile;
+
+// Base for WebDataService class hierarchy.
+class WebDataServiceBase : public RefcountedProfileKeyedService {
+ public:
+ static scoped_refptr<WebDataServiceBase> ForProfile(Profile* profile);
+
+ // All requests return an opaque handle of the following type.
+ typedef int Handle;
+
+ WebDataServiceBase();
+
+ // Cancel any pending request. You need to call this method if your
+ // WebDataServiceConsumer is about to be deleted.
+ virtual void CancelRequest(Handle h) = 0;
+
+ protected:
+ virtual ~WebDataServiceBase() {}
+};
+
+#endif // CHROME_BROWSER_API_WEBDATA_WEB_DATA_SERVICE_BASE_H_

Powered by Google App Engine
This is Rietveld 408576698