| OLD | NEW |
| 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 "components/history/core/browser/top_sites_backend.h" | 5 #include "components/history/core/browser/top_sites_backend.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 9 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 10 #include "base/location.h" | 12 #include "base/location.h" |
| 11 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 12 #include "base/metrics/histogram_macros.h" | 14 #include "base/metrics/histogram_macros.h" |
| 13 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
| 14 #include "base/task/cancelable_task_tracker.h" | 16 #include "base/task/cancelable_task_tracker.h" |
| 15 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 16 #include "base/trace_event/trace_event.h" | 18 #include "base/trace_event/trace_event.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 140 |
| 139 void TopSitesBackend::ResetDatabaseOnDBThread(const base::FilePath& file_path) { | 141 void TopSitesBackend::ResetDatabaseOnDBThread(const base::FilePath& file_path) { |
| 140 DCHECK(db_task_runner_->BelongsToCurrentThread()); | 142 DCHECK(db_task_runner_->BelongsToCurrentThread()); |
| 141 db_.reset(NULL); | 143 db_.reset(NULL); |
| 142 sql::Connection::Delete(db_path_); | 144 sql::Connection::Delete(db_path_); |
| 143 db_.reset(new TopSitesDatabase()); | 145 db_.reset(new TopSitesDatabase()); |
| 144 InitDBOnDBThread(db_path_); | 146 InitDBOnDBThread(db_path_); |
| 145 } | 147 } |
| 146 | 148 |
| 147 } // namespace history | 149 } // namespace history |
| OLD | NEW |