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

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

Issue 2434993002: Add methods to Reading List Model (Closed)
Patch Set: Remove ClearModelForTest 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
« no previous file with comments | « no previous file | ios/chrome/browser/reading_list/reading_list_model_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_H_ 5 #ifndef IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_H_
6 #define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_H_ 6 #define IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const std::string& title) = 0; 72 const std::string& title) = 0;
73 73
74 // Removes an entry. The removal may be asynchronous, and not happen 74 // Removes an entry. The removal may be asynchronous, and not happen
75 // immediately. 75 // immediately.
76 virtual void RemoveEntryByUrl(const GURL& url) = 0; 76 virtual void RemoveEntryByUrl(const GURL& url) = 0;
77 77
78 // If the |url| is in the reading list and unread, mark it read. If it is in 78 // If the |url| is in the reading list and unread, mark it read. If it is in
79 // the reading list and read, move it to the top of unread if it is not here 79 // the reading list and read, move it to the top of unread if it is not here
80 // already. This may trigger deletion of old read entries. 80 // already. This may trigger deletion of old read entries.
81 virtual void MarkReadByURL(const GURL& url) = 0; 81 virtual void MarkReadByURL(const GURL& url) = 0;
82 // If the |url| is in the reading list and read, mark it unread. If it is in
83 // the reading list and unread, move it to the top of read if it is not here
84 // already.
85 virtual void MarkUnreadByURL(const GURL& url) = 0;
82 86
83 // Methods to mutate an entry. Will locate the relevant entry by URL. Does 87 // Methods to mutate an entry. Will locate the relevant entry by URL. Does
84 // nothing if the entry is not found. 88 // nothing if the entry is not found.
85 virtual void SetEntryTitle(const GURL& url, const std::string& title) = 0; 89 virtual void SetEntryTitle(const GURL& url, const std::string& title) = 0;
86 virtual void SetEntryDistilledURL(const GURL& url, 90 virtual void SetEntryDistilledURL(const GURL& url,
87 const GURL& distilled_url) = 0; 91 const GURL& distilled_url) = 0;
88 virtual void SetEntryDistilledState( 92 virtual void SetEntryDistilledState(
89 const GURL& url, 93 const GURL& url,
90 ReadingListEntry::DistillationState state) = 0; 94 ReadingListEntry::DistillationState state) = 0;
91 95
(...skipping 27 matching lines...) Expand all
119 // ReadingListBatchUpdateToken dtor. 123 // ReadingListBatchUpdateToken dtor.
120 virtual void EndBatchUpdates(); 124 virtual void EndBatchUpdates();
121 125
122 private: 126 private:
123 unsigned int current_batch_updates_count_; 127 unsigned int current_batch_updates_count_;
124 128
125 DISALLOW_COPY_AND_ASSIGN(ReadingListModel); 129 DISALLOW_COPY_AND_ASSIGN(ReadingListModel);
126 }; 130 };
127 131
128 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_H_ 132 #endif // IOS_CHROME_BROWSER_READING_LIST_READING_LIST_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/reading_list/reading_list_model_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698