| 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/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/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "base/threading/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/core/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 |
| 26 // it can be used inline in other SQL statements below. | 26 // it can be used inline in other SQL statements below. |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 db_.reset(); | 606 db_.reset(); |
| 607 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, | 607 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, |
| 608 base::Bind(callback, success)); | 608 base::Bind(callback, success)); |
| 609 } | 609 } |
| 610 | 610 |
| 611 bool OfflinePageMetadataStoreSQL::CheckDb() const { | 611 bool OfflinePageMetadataStoreSQL::CheckDb() const { |
| 612 return db_ && state_ == StoreState::LOADED; | 612 return db_ && state_ == StoreState::LOADED; |
| 613 } | 613 } |
| 614 | 614 |
| 615 } // namespace offline_pages | 615 } // namespace offline_pages |
| OLD | NEW |