OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_impl.h" | 5 #include "components/offline_pages/offline_page_metadata_store_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/metrics/histogram_macros.h" | 13 #include "base/metrics/histogram_macros.h" |
14 #include "base/sequenced_task_runner.h" | 14 #include "base/sequenced_task_runner.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "base/thread_task_runner_handle.h" | 17 #include "base/thread_task_runner_handle.h" |
| 18 #include "build/build_config.h" |
18 #include "components/leveldb_proto/proto_database_impl.h" | 19 #include "components/leveldb_proto/proto_database_impl.h" |
19 #include "components/offline_pages/offline_page_item.h" | 20 #include "components/offline_pages/offline_page_item.h" |
20 #include "components/offline_pages/proto/offline_pages.pb.h" | 21 #include "components/offline_pages/proto/offline_pages.pb.h" |
21 #include "third_party/leveldatabase/env_chromium.h" | 22 #include "third_party/leveldatabase/env_chromium.h" |
22 #include "third_party/leveldatabase/src/include/leveldb/db.h" | 23 #include "third_party/leveldatabase/src/include/leveldb/db.h" |
23 #include "url/gurl.h" | 24 #include "url/gurl.h" |
24 | 25 |
25 using leveldb_proto::ProtoDatabase; | 26 using leveldb_proto::ProtoDatabase; |
26 | 27 |
27 namespace { | 28 namespace { |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 248 |
248 void OfflinePageMetadataStoreImpl::ResetDone( | 249 void OfflinePageMetadataStoreImpl::ResetDone( |
249 const ResetCallback& callback, | 250 const ResetCallback& callback, |
250 bool success) { | 251 bool success) { |
251 database_.reset(); | 252 database_.reset(); |
252 weak_ptr_factory_.InvalidateWeakPtrs(); | 253 weak_ptr_factory_.InvalidateWeakPtrs(); |
253 callback.Run(success); | 254 callback.Run(success); |
254 } | 255 } |
255 | 256 |
256 } // namespace offline_pages | 257 } // namespace offline_pages |
OLD | NEW |