Chromium Code Reviews| Index: components/webdata/common/web_database_observer.h |
| diff --git a/components/webdata/common/web_database_observer.h b/components/webdata/common/web_database_observer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2374f91b49d27dc845600ac423e5385471c31693 |
| --- /dev/null |
| +++ b/components/webdata/common/web_database_observer.h |
| @@ -0,0 +1,26 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
dhollowa
2013/04/18 16:21:17
nit: "Copyright 2013"
Cait (Slow)
2013/04/19 19:06:22
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_OBSERVER_H_ |
| +#define COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_OBSERVER_H_ |
| + |
| +#include "sql/init_status.h" |
| + |
| +// WebDatabase loads asynchronously on the DB thread. Clients on the UI thread |
| +// can use this interface to be notified when the load is complete, or if it |
| +// fails. |
| +class WebDatabaseObserver { |
| + public: |
| + // Called when DB has been loaded successfully. |
| + virtual void WebDatabaseLoaded() {}; |
|
dhollowa
2013/04/18 16:21:17
Could you explain why these are not "= 0"? I'm ok
Cait (Slow)
2013/04/19 19:06:22
Several observers want to be told that the DB load
|
| + |
| + // Called when load failed. |status| contains error code. |
| + virtual void WebDatabaseLoadFailed(sql::InitStatus status) {}; |
| + |
| + protected: |
| + virtual ~WebDatabaseObserver() {} |
| +}; |
| + |
| + |
| +#endif // COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_OBSERVER_H_ |