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/reading_list/reading_list_model_impl.h" | 5 #include "components/reading_list/ios/reading_list_model_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "components/prefs/pref_service.h" | 11 #include "components/prefs/pref_service.h" |
12 #include "components/reading_list/reading_list_model_storage.h" | 12 #include "components/reading_list/ios/reading_list_model_storage.h" |
13 #include "components/reading_list/reading_list_pref_names.h" | 13 #include "components/reading_list/ios/reading_list_pref_names.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 ReadingListModelImpl::ReadingListModelImpl() | 16 ReadingListModelImpl::ReadingListModelImpl() |
17 : ReadingListModelImpl(nullptr, nullptr) {} | 17 : ReadingListModelImpl(nullptr, nullptr) {} |
18 | 18 |
19 ReadingListModelImpl::ReadingListModelImpl( | 19 ReadingListModelImpl::ReadingListModelImpl( |
20 std::unique_ptr<ReadingListModelStorage> storage, | 20 std::unique_ptr<ReadingListModelStorage> storage, |
21 PrefService* pref_service) | 21 PrefService* pref_service) |
22 : pref_service_(pref_service), | 22 : pref_service_(pref_service), |
23 has_unseen_(false), | 23 has_unseen_(false), |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 DCHECK(loaded()); | 507 DCHECK(loaded()); |
508 std::sort(read_->begin(), read_->end(), | 508 std::sort(read_->begin(), read_->end(), |
509 ReadingListEntry::CompareEntryUpdateTime); | 509 ReadingListEntry::CompareEntryUpdateTime); |
510 std::sort(unread_->begin(), unread_->end(), | 510 std::sort(unread_->begin(), unread_->end(), |
511 ReadingListEntry::CompareEntryUpdateTime); | 511 ReadingListEntry::CompareEntryUpdateTime); |
512 } | 512 } |
513 | 513 |
514 ReadingListModelStorage* ReadingListModelImpl::StorageLayer() { | 514 ReadingListModelStorage* ReadingListModelImpl::StorageLayer() { |
515 return storage_layer_.get(); | 515 return storage_layer_.get(); |
516 } | 516 } |
OLD | NEW |