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

Issue 2378123002: Load offline page if reading list entry takes more than 1s to load. (Closed)

Created:
4 years, 2 months ago by jif
Modified:
3 years, 10 months ago
Reviewers:
gambard, sdefresne
CC:
chromium-reviews, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Load offline page if reading list entry takes more than 1s to load. BUG=None

Patch Set 1 #

Total comments: 6

Patch Set 2 : Experimental change (reviewers: do not review this PS). #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+236 lines, -21 lines) Patch
M components/sessions/core/serialized_navigation_entry.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ios/chrome/browser/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_download_service.cc View 2 chunks +12 lines, -6 lines 2 comments Download
M ios/chrome/browser/reading_list/reading_list_model.h View 1 chunk +4 lines, -3 lines 1 comment Download
M ios/chrome/browser/reading_list/reading_list_model_impl.h View 2 chunks +6 lines, -3 lines 0 comments Download
M ios/chrome/browser/reading_list/reading_list_model_impl.cc View 1 chunk +23 lines, -5 lines 0 comments Download
A ios/chrome/browser/reading_list/reading_list_web_state_observer.h View 1 chunk +54 lines, -0 lines 2 comments Download
A ios/chrome/browser/reading_list/reading_list_web_state_observer.mm View 1 1 chunk +103 lines, -0 lines 2 comments Download
M ios/chrome/browser/ui/url_loader.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M ios/web/navigation/navigation_item_impl.h View 1 2 chunks +7 lines, -0 lines 3 comments Download
M ios/web/navigation/navigation_item_impl.mm View 1 2 chunks +6 lines, -1 line 0 comments Download
M ios/web/public/navigation_item.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ios/web/public/navigation_manager.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M ios/web/web_state/ui/crw_web_controller.mm View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/base/page_transition_types.h View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 11 (8 generated)
jif
Ignore changes outside of ios/ ptal.
4 years, 2 months ago (2016-09-28 19:50:53 UTC) #8
gambard
You will conflict with https://codereview.chromium.org/2369303002/ https://codereview.chromium.org/2378123002/diff/80001/ios/chrome/browser/reading_list/reading_list_model_impl.cc File ios/chrome/browser/reading_list/reading_list_model_impl.cc (right): https://codereview.chromium.org/2378123002/diff/80001/ios/chrome/browser/reading_list/reading_list_model_impl.cc#newcode75 ios/chrome/browser/reading_list/reading_list_model_impl.cc:75: auto it = std::find_if( ...
4 years, 2 months ago (2016-10-03 09:04:45 UTC) #9
sdefresne
4 years, 2 months ago (2016-10-04 13:26:47 UTC) #11
drive-by

https://codereview.chromium.org/2378123002/diff/100001/ios/chrome/browser/rea...
File ios/chrome/browser/reading_list/reading_list_download_service.cc (right):

https://codereview.chromium.org/2378123002/diff/100001/ios/chrome/browser/rea...
ios/chrome/browser/reading_list/reading_list_download_service.cc:99: if (entry)
Can this be null? It look like it iterate over all entries and remove them.
Should this instead be DCHECK(entry)?

https://codereview.chromium.org/2378123002/diff/100001/ios/chrome/browser/rea...
ios/chrome/browser/reading_list/reading_list_download_service.cc:105: if (entry)
ditto

https://codereview.chromium.org/2378123002/diff/100001/ios/chrome/browser/rea...
File ios/chrome/browser/reading_list/reading_list_model.h (right):

https://codereview.chromium.org/2378123002/diff/100001/ios/chrome/browser/rea...
ios/chrome/browser/reading_list/reading_list_model.h:56: // Returns a specific
entry. Returns nullptr if the entry does not exist.
s/nullptr/null/ in comments

https://codereview.chromium.org/2378123002/diff/100001/ios/chrome/browser/rea...
File ios/chrome/browser/reading_list/reading_list_web_state_observer.h (right):

https://codereview.chromium.org/2378123002/diff/100001/ios/chrome/browser/rea...
ios/chrome/browser/reading_list/reading_list_web_state_observer.h:23:
web::BrowserState* browser_state);
You should pass a ios::ChromeBrowserState, only code in ios/web and BSKSF should
use web::BrowserState. Or better, since you only pass this to get the
ReadingListModel, just pass a ReadingListModel (this will make the code easier
to unit test).

https://codereview.chromium.org/2378123002/diff/100001/ios/chrome/browser/rea...
ios/chrome/browser/reading_list/reading_list_web_state_observer.h:28: explicit
ReadingListWebStateObserver(web::WebState* web_state,
"explicit" is for constructor with one parameter only (or with default values),
remove it from here.

https://codereview.chromium.org/2378123002/diff/100001/ios/chrome/browser/rea...
File ios/chrome/browser/reading_list/reading_list_web_state_observer.mm (right):

https://codereview.chromium.org/2378123002/diff/100001/ios/chrome/browser/rea...
ios/chrome/browser/reading_list/reading_list_web_state_observer.mm:40:
ReadingListModelFactory::GetForBrowserState(chrome_browser_state);
Pass the reading_list_model as a parameter, and remove the browser_state.

https://codereview.chromium.org/2378123002/diff/100001/ios/chrome/browser/rea...
ios/chrome/browser/reading_list/reading_list_web_state_observer.mm:94: if
(progress < 15) {
Can you use a named constant instead of "15" so that someone reading the code
understand what is checked here?

https://codereview.chromium.org/2378123002/diff/100001/ios/web/navigation/nav...
File ios/web/navigation/navigation_item_impl.h (right):

https://codereview.chromium.org/2378123002/diff/100001/ios/web/navigation/nav...
ios/web/navigation/navigation_item_impl.h:73:
base::scoped_nsobject<NSDictionary> extra_data_;
style: ivar should go after all methods, and should not be public.

https://codereview.chromium.org/2378123002/diff/100001/ios/web/navigation/nav...
ios/web/navigation/navigation_item_impl.h:75: 
Remove blank line.

https://codereview.chromium.org/2378123002/diff/100001/ios/web/navigation/nav...
ios/web/navigation/navigation_item_impl.h:148: 
Remove blank line.

Powered by Google App Engine
This is Rietveld 408576698