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

Side by Side Diff: chrome/browser/history/top_sites_backend.cc

Issue 339433007: Componentize URLDatabase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/history/top_sites_backend.h" 5 #include "chrome/browser/history/top_sites_backend.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/task/cancelable_task_tracker.h" 11 #include "base/task/cancelable_task_tracker.h"
12 #include "chrome/browser/history/top_sites_database.h" 12 #include "chrome/browser/history/top_sites_database.h"
13 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
14 #include "sql/connection.h"
14 15
15 using content::BrowserThread; 16 using content::BrowserThread;
16 17
17 namespace history { 18 namespace history {
18 19
19 TopSitesBackend::TopSitesBackend() 20 TopSitesBackend::TopSitesBackend()
20 : db_(new TopSitesDatabase()) { 21 : db_(new TopSitesDatabase()) {
21 } 22 }
22 23
23 void TopSitesBackend::Init(const base::FilePath& path) { 24 void TopSitesBackend::Init(const base::FilePath& path) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 131
131 void TopSitesBackend::ResetDatabaseOnDBThread(const base::FilePath& file_path) { 132 void TopSitesBackend::ResetDatabaseOnDBThread(const base::FilePath& file_path) {
132 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); 133 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
133 db_.reset(NULL); 134 db_.reset(NULL);
134 sql::Connection::Delete(db_path_); 135 sql::Connection::Delete(db_path_);
135 db_.reset(new TopSitesDatabase()); 136 db_.reset(new TopSitesDatabase());
136 InitDBOnDBThread(db_path_); 137 InitDBOnDBThread(db_path_);
137 } 138 }
138 139
139 } // namespace history 140 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/thumbnail_database.cc ('k') | chrome/browser/history/top_sites_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698