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

Unified Diff: components/webdata/common/web_data_service_base.h

Issue 15927029: Replace WebDatabaseObserver with callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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: components/webdata/common/web_data_service_base.h
diff --git a/components/webdata/common/web_data_service_base.h b/components/webdata/common/web_data_service_base.h
index 9e0867dd8fa0c8743c585ba9e10485516e108496..b86ebc96da037459c4bfc7d373044ddc763d01f2 100644
--- a/components/webdata/common/web_data_service_base.h
+++ b/components/webdata/common/web_data_service_base.h
@@ -9,7 +9,6 @@
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "components/webdata/common/web_database_observer.h"
#include "components/webdata/common/webdata_export.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_source.h"
@@ -25,8 +24,7 @@ class Thread;
// Base for WebDataService class hierarchy.
class WEBDATA_EXPORT WebDataServiceBase
- : public WebDatabaseObserver,
- public base::RefCountedThreadSafe<WebDataServiceBase,
+ : public base::RefCountedThreadSafe<WebDataServiceBase,
content::BrowserThread::DeleteOnUIThread> {
public:
// All requests return an opaque handle of the following type.
@@ -50,10 +48,6 @@ class WEBDATA_EXPORT WebDataServiceBase
WebDataServiceBase(scoped_refptr<WebDatabaseService> wdbs,
const ProfileErrorCallback& callback);
- // WebDatabaseObserver implementation.
- virtual void WebDatabaseLoaded() OVERRIDE;
- virtual void WebDatabaseLoadFailed(sql::InitStatus status) OVERRIDE;
-
// Cancel any pending request. You need to call this method if your
// WebDataServiceConsumer is about to be deleted.
virtual void CancelRequest(Handle h);
@@ -76,8 +70,8 @@ class WEBDATA_EXPORT WebDataServiceBase
// Unloads the database permanently and shuts down service.
void ShutdownDatabase();
- virtual void AddDBObserver(WebDatabaseObserver* observer);
- virtual void RemoveDBObserver(WebDatabaseObserver* observer);
+ virtual void RegisterDBLoadedCallback(
Jói 2013/06/04 22:17:25 Can you register one or more? Can you unregister?
Cait (Slow) 2013/06/05 19:14:48 Done.
+ const base::Callback<void(void)>& callback);
// Returns true if the database load has completetd successfully, and
// ShutdownOnUIThread has not yet been called.
@@ -94,9 +88,6 @@ class WEBDATA_EXPORT WebDataServiceBase
// Our database service.
scoped_refptr<WebDatabaseService> wdbs_;
- // True if we've received a notification that the WebDatabase has loaded.
- bool db_loaded_;
-
private:
friend struct content::BrowserThread::DeleteOnThread<
content::BrowserThread::UI>;

Powered by Google App Engine
This is Rietveld 408576698