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

Unified Diff: components/history/core/browser/history_database.h

Issue 849323002: Componentize HistoryDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android compilation Created 5 years, 11 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/history/core/browser/history_database.h
diff --git a/chrome/browser/history/history_database.h b/components/history/core/browser/history_database.h
similarity index 93%
rename from chrome/browser/history/history_database.h
rename to components/history/core/browser/history_database.h
index 687ef88545794815863b8a96267ccdcca7aa2b43..3c9223a50c7200436340027009f7af4eb2d88132 100644
--- a/chrome/browser/history/history_database.h
+++ b/components/history/core/browser/history_database.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_
-#define CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DATABASE_H_
+#define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DATABASE_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
@@ -18,8 +18,8 @@
#include "sql/meta_table.h"
#if defined(OS_ANDROID)
-#include "components/history/core/android/android_cache_database.h"
-#include "components/history/core/android/android_urls_database.h"
+#include "components/history/core/browser/android/android_cache_database.h"
+#include "components/history/core/browser/android/android_urls_database.h"
#endif
namespace base {
@@ -53,9 +53,8 @@ class HistoryDatabase : public DownloadDatabase,
explicit TransactionScoper(HistoryDatabase* db) : db_(db) {
db_->BeginTransaction();
}
- ~TransactionScoper() {
- db_->CommitTransaction();
- }
+ ~TransactionScoper() { db_->CommitTransaction(); }
+
private:
HistoryDatabase* db_;
};
@@ -63,7 +62,8 @@ class HistoryDatabase : public DownloadDatabase,
// Must call Init() to complete construction. Although it can be created on
// any thread, it must be destructed on the history thread for proper
// database cleanup.
- HistoryDatabase();
+ HistoryDatabase(DownloadInterruptReason download_interrupt_reason_none,
+ DownloadInterruptReason download_interrupt_reason_crash);
~HistoryDatabase() override;
@@ -193,4 +193,4 @@ class HistoryDatabase : public DownloadDatabase,
} // namespace history
-#endif // CHROME_BROWSER_HISTORY_HISTORY_DATABASE_H_
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_DATABASE_H_
« no previous file with comments | « components/history/core/browser/download_database.cc ('k') | components/history/core/browser/history_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698