Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(736)

Side by Side Diff: ios/chrome/browser/reading_list/reading_list_model_impl.h

Issue 2434993002: Add methods to Reading List Model (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_IMPL_H_ 5 #ifndef IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_IMPL_H_
6 #define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_IMPL_H_ 6 #define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "components/keyed_service/core/keyed_service.h" 10 #include "components/keyed_service/core/keyed_service.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 bool CallbackEntryURL( 42 bool CallbackEntryURL(
43 const GURL& url, 43 const GURL& url,
44 base::Callback<void(const ReadingListEntry&)> callback) const override; 44 base::Callback<void(const ReadingListEntry&)> callback) const override;
45 45
46 void RemoveEntryByUrl(const GURL& url) override; 46 void RemoveEntryByUrl(const GURL& url) override;
47 47
48 const ReadingListEntry& AddEntry(const GURL& url, 48 const ReadingListEntry& AddEntry(const GURL& url,
49 const std::string& title) override; 49 const std::string& title) override;
50 50
51 void MarkReadByURL(const GURL& url) override; 51 void MarkReadByURL(const GURL& url) override;
52 void MarkUnreadByURL(const GURL& url) override;
52 53
53 void SetEntryTitle(const GURL& url, const std::string& title) override; 54 void SetEntryTitle(const GURL& url, const std::string& title) override;
54 void SetEntryDistilledURL(const GURL& url, 55 void SetEntryDistilledURL(const GURL& url,
55 const GURL& distilled_url) override; 56 const GURL& distilled_url) override;
56 void SetEntryDistilledState( 57 void SetEntryDistilledState(
57 const GURL& url, 58 const GURL& url,
58 ReadingListEntry::DistillationState state) override; 59 ReadingListEntry::DistillationState state) override;
59 60
61 void ClearModelForTest() override;
62
60 protected: 63 protected:
61 void EndBatchUpdates() override; 64 void EndBatchUpdates() override;
62 65
63 private: 66 private:
64 typedef std::vector<ReadingListEntry> ReadingListEntries; 67 typedef std::vector<ReadingListEntry> ReadingListEntries;
65 68
66 ReadingListEntries unread_; 69 ReadingListEntries unread_;
67 ReadingListEntries read_; 70 ReadingListEntries read_;
68 std::unique_ptr<ReadingListModelStorage> storageLayer_; 71 std::unique_ptr<ReadingListModelStorage> storageLayer_;
69 bool hasUnseen_; 72 bool hasUnseen_;
70 bool loaded_; 73 bool loaded_;
71 74
72 DISALLOW_COPY_AND_ASSIGN(ReadingListModelImpl); 75 DISALLOW_COPY_AND_ASSIGN(ReadingListModelImpl);
73 }; 76 };
74 77
75 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_MEMORY_H_ 78 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_MEMORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698