| 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/core/offline_page_metadata_store_sql.h" | 5 #include "components/offline_pages/core/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/single_thread_task_runner.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 15 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
| 16 #include "components/offline_pages/core/offline_page_item.h" | 17 #include "components/offline_pages/core/offline_page_item.h" |
| 17 #include "sql/connection.h" | 18 #include "sql/connection.h" |
| 18 #include "sql/statement.h" | 19 #include "sql/statement.h" |
| 19 #include "sql/transaction.h" | 20 #include "sql/transaction.h" |
| 20 | 21 |
| 21 namespace offline_pages { | 22 namespace offline_pages { |
| 22 | 23 |
| 23 namespace { | 24 namespace { |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 db_.reset(); | 605 db_.reset(); |
| 605 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, | 606 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, |
| 606 base::Bind(callback, success)); | 607 base::Bind(callback, success)); |
| 607 } | 608 } |
| 608 | 609 |
| 609 bool OfflinePageMetadataStoreSQL::CheckDb() const { | 610 bool OfflinePageMetadataStoreSQL::CheckDb() const { |
| 610 return db_ && state_ == StoreState::LOADED; | 611 return db_ && state_ == StoreState::LOADED; |
| 611 } | 612 } |
| 612 | 613 |
| 613 } // namespace offline_pages | 614 } // namespace offline_pages |
| OLD | NEW |