| 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" |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 } | 571 } |
| 572 | 572 |
| 573 void OfflinePageMetadataStoreSQL::OnResetDone(const ResetCallback& callback, | 573 void OfflinePageMetadataStoreSQL::OnResetDone(const ResetCallback& callback, |
| 574 StoreState state) { | 574 StoreState state) { |
| 575 OnOpenConnectionDone(state); | 575 OnOpenConnectionDone(state); |
| 576 callback.Run(state == StoreState::LOADED); | 576 callback.Run(state == StoreState::LOADED); |
| 577 } | 577 } |
| 578 | 578 |
| 579 bool OfflinePageMetadataStoreSQL::CheckDb(const base::Closure& callback) { | 579 bool OfflinePageMetadataStoreSQL::CheckDb(const base::Closure& callback) { |
| 580 if (!db_.get() || state_ != StoreState::LOADED) { | 580 if (!db_.get() || state_ != StoreState::LOADED) { |
| 581 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, | 581 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); |
| 582 base::Bind(callback)); | |
| 583 return false; | 582 return false; |
| 584 } | 583 } |
| 585 return true; | 584 return true; |
| 586 } | 585 } |
| 587 | 586 |
| 588 } // namespace offline_pages | 587 } // namespace offline_pages |
| OLD | NEW |