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

Side by Side Diff: components/reading_list/core/reading_list_entry.h

Issue 2763233003: Move ReadingList model to components/reading_list/core (Closed)
Patch Set: feedback Created 3 years, 9 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 COMPONENTS_READING_LIST_IOS_READING_LIST_ENTRY_H_ 5 #ifndef COMPONENTS_READING_LIST_CORE_READING_LIST_ENTRY_H_
6 #define COMPONENTS_READING_LIST_IOS_READING_LIST_ENTRY_H_ 6 #define COMPONENTS_READING_LIST_CORE_READING_LIST_ENTRY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "net/base/backoff_entry.h" 13 #include "net/base/backoff_entry.h"
14 #include "url/gurl.h" 14 #include "url/gurl.h"
15 15
16 namespace reading_list { 16 namespace reading_list {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 ReadingListEntry(const GURL& url, 55 ReadingListEntry(const GURL& url,
56 const std::string& title, 56 const std::string& title,
57 const base::Time& now, 57 const base::Time& now,
58 std::unique_ptr<net::BackoffEntry> backoff); 58 std::unique_ptr<net::BackoffEntry> backoff);
59 ReadingListEntry(ReadingListEntry&& entry); 59 ReadingListEntry(ReadingListEntry&& entry);
60 ~ReadingListEntry(); 60 ~ReadingListEntry();
61 61
62 // Entries are created in WAITING state. At some point they will be PROCESSING 62 // Entries are created in WAITING state. At some point they will be PROCESSING
63 // into one of the three state: PROCESSED, the only state a distilled URL 63 // into one of the three state: PROCESSED, the only state a distilled URL
64 // would be set, WILL_RETRY, similar to wait, but with exponential delays or 64 // would be set, WILL_RETRY, similar to wait, but with exponential delays or
65 // ERROR where the system will not retry at all. 65 // DISTILLATION_ERROR where the system will not retry at all.
66 enum DistillationState { WAITING, PROCESSING, PROCESSED, WILL_RETRY, ERROR }; 66 enum DistillationState {
67 WAITING,
68 PROCESSING,
69 PROCESSED,
70 WILL_RETRY,
71 DISTILLATION_ERROR
72 };
67 73
68 static const net::BackoffEntry::Policy kBackoffPolicy; 74 static const net::BackoffEntry::Policy kBackoffPolicy;
69 75
70 // The URL of the page the user would like to read later. 76 // The URL of the page the user would like to read later.
71 const GURL& URL() const; 77 const GURL& URL() const;
72 // The title of the entry. Might be empty. 78 // The title of the entry. Might be empty.
73 const std::string& Title() const; 79 const std::string& Title() const;
74 // What state this entry is in. 80 // What state this entry is in.
75 DistillationState DistilledState() const; 81 DistillationState DistilledState() const;
76 // The local file path for the distilled version of the page. This should only 82 // The local file path for the distilled version of the page. This should only
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 int64_t creation_time_us_; 205 int64_t creation_time_us_;
200 int64_t first_read_time_us_; 206 int64_t first_read_time_us_;
201 int64_t update_time_us_; 207 int64_t update_time_us_;
202 int64_t update_title_time_us_; 208 int64_t update_title_time_us_;
203 int64_t distillation_time_us_; 209 int64_t distillation_time_us_;
204 int64_t distillation_size_; 210 int64_t distillation_size_;
205 211
206 DISALLOW_COPY_AND_ASSIGN(ReadingListEntry); 212 DISALLOW_COPY_AND_ASSIGN(ReadingListEntry);
207 }; 213 };
208 214
209 #endif // COMPONENTS_READING_LIST_IOS_READING_LIST_ENTRY_H_ 215 #endif // COMPONENTS_READING_LIST_CORE_READING_LIST_ENTRY_H_
OLDNEW
« no previous file with comments | « components/reading_list/core/proto/reading_list.proto ('k') | components/reading_list/core/reading_list_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698