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

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

Issue 870063002: Componentize TopSites, TopSitesBackend, TopSitesDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@815983002
Patch Set: Fix typo 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
« no previous file with comments | « components/history/core/browser/top_sites.cc ('k') | components/history/core/browser/top_sites_backend.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/top_sites_backend.h
diff --git a/chrome/browser/history/top_sites_backend.h b/components/history/core/browser/top_sites_backend.h
similarity index 87%
rename from chrome/browser/history/top_sites_backend.h
rename to components/history/core/browser/top_sites_backend.h
index 51700c98ff1e9c8374d9ad483cd60191614f61a5..d3c054b81032026a27077b0837323c028fba7eaf 100644
--- a/chrome/browser/history/top_sites_backend.h
+++ b/components/history/core/browser/top_sites_backend.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_TOP_SITES_BACKEND_H_
-#define CHROME_BROWSER_HISTORY_TOP_SITES_BACKEND_H_
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_BACKEND_H_
+#define COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_BACKEND_H_
#include "base/callback.h"
#include "base/files/file_path.h"
@@ -14,6 +14,7 @@
namespace base {
class CancelableTaskTracker;
class FilePath;
+class SingleThreadTaskRunner;
}
namespace history {
@@ -30,7 +31,8 @@ class TopSitesBackend : public base::RefCountedThreadSafe<TopSitesBackend> {
typedef base::Callback<void(const scoped_refptr<MostVisitedThumbnails>&)>
GetMostVisitedThumbnailsCallback;
- TopSitesBackend();
+ explicit TopSitesBackend(
+ const scoped_refptr<base::SingleThreadTaskRunner>& db_task_runner);
void Init(const base::FilePath& path);
@@ -62,7 +64,7 @@ class TopSitesBackend : public base::RefCountedThreadSafe<TopSitesBackend> {
private:
friend class base::RefCountedThreadSafe<TopSitesBackend>;
- virtual ~TopSitesBackend();
+ ~TopSitesBackend();
// Invokes Init on the db_.
void InitDBOnDBThread(const base::FilePath& path);
@@ -88,10 +90,11 @@ class TopSitesBackend : public base::RefCountedThreadSafe<TopSitesBackend> {
base::FilePath db_path_;
scoped_ptr<TopSitesDatabase> db_;
+ scoped_refptr<base::SingleThreadTaskRunner> db_task_runner_;
DISALLOW_COPY_AND_ASSIGN(TopSitesBackend);
};
} // namespace history
-#endif // CHROME_BROWSER_HISTORY_TOP_SITES_BACKEND_H_
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_BACKEND_H_
« no previous file with comments | « components/history/core/browser/top_sites.cc ('k') | components/history/core/browser/top_sites_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698