OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/offline_pages/offline_page_metadata_store_sql.h" | 5 #include "components/offline_pages/offline_page_metadata_store_sql.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/metrics/histogram_macros.h" | 12 #include "base/metrics/histogram_macros.h" |
13 #include "base/sequenced_task_runner.h" | 13 #include "base/sequenced_task_runner.h" |
14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "components/offline_pages/offline_page_item.h" | 16 #include "components/offline_pages/offline_page_item.h" |
17 #include "sql/connection.h" | 17 #include "sql/connection.h" |
18 #include "sql/statement.h" | 18 #include "sql/statement.h" |
19 #include "sql/transaction.h" | 19 #include "sql/transaction.h" |
20 | 20 |
21 namespace offline_pages { | 21 namespace offline_pages { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // This is a macro instead of a const so that | 25 // This is a macro instead of a const so that |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 } | 322 } |
323 | 323 |
324 void OfflinePageMetadataStoreSQL::Reset(const ResetCallback& callback) { | 324 void OfflinePageMetadataStoreSQL::Reset(const ResetCallback& callback) { |
325 background_task_runner_->PostTask( | 325 background_task_runner_->PostTask( |
326 FROM_HERE, | 326 FROM_HERE, |
327 base::Bind(&OfflinePageMetadataStoreSQL::ResetSync, base::Passed(&db_), | 327 base::Bind(&OfflinePageMetadataStoreSQL::ResetSync, base::Passed(&db_), |
328 base::ThreadTaskRunnerHandle::Get(), callback)); | 328 base::ThreadTaskRunnerHandle::Get(), callback)); |
329 } | 329 } |
330 | 330 |
331 } // namespace offline_pages | 331 } // namespace offline_pages |
OLD | NEW |