#ifndef CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_
#define CHROME_BROWSER_WEBDATA_WEB_DATABASE_H_
#include "base/memory/scoped_ptr.h"
#include "sql/connection.h"
#include "sql/init_status.h"
#include "sql/meta_table.h"
class AutofillTable;
class FilePath;
class KeywordTable;
class LoginsTable;
class TokenServiceTable;
class WebAppsTable;
class WebIntentsTable;
namespace content {
class NotificationService;
}
class WebDatabase {
public:
static const int kCurrentVersionNumber;
WebDatabase();
virtual ~WebDatabase();
sql::InitStatus Init(const FilePath& db_name);
void BeginTransaction();
void CommitTransaction();
virtual AutofillTable* GetAutofillTable();
virtual KeywordTable* GetKeywordTable();
virtual LoginsTable* GetLoginsTable();
virtual TokenServiceTable* GetTokenServiceTable();
virtual WebAppsTable* GetWebAppsTable();
virtual WebIntentsTable* GetWebIntentsTable();
sql::Connection* GetSQLConnection();
private:
sql::InitStatus MigrateOldVersionsAsNeeded();
sql::Connection db_;
sql::MetaTable meta_table_;
scoped_ptr<AutofillTable> autofill_table_;
scoped_ptr<KeywordTable> keyword_table_;
scoped_ptr<LoginsTable> logins_table_;
scoped_ptr<TokenServiceTable> token_service_table_;
scoped_ptr<WebAppsTable> web_apps_table_;
scoped_ptr<WebIntentsTable> web_intents_table_;
scoped_ptr<content::NotificationService> notification_service_;
DISALLOW_COPY_AND_ASSIGN(WebDatabase);
};
#endif