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

Issue 2185973003: [Offline Pages] Delete associated page along with bookmark. (Closed)

Created:
4 years, 4 months ago by romax
Modified:
4 years, 3 months ago
Reviewers:
Lei Zhang, Dmitry Titov, sky
CC:
chromium-reviews, noyau+watch_chromium.org, browser-components-watch_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Offline Pages] Delete associated page along with bookmark. When deleting bookmarks we should also delete the associated offline page cache. Doing this by adding an observer owned by BookmarkModel and get initialized as part of BookmarkModel. BUG=630796 Committed: https://crrev.com/c02075fe34677d1d194b65e6b2536a3f2204640a Cr-Commit-Position: refs/heads/master@{#416343}

Patch Set 1 #

Patch Set 2 : Use BookmarkModelObserver #

Total comments: 2

Patch Set 3 : Moving to c++. #

Total comments: 2

Patch Set 4 : Adding offline_pages::ExternalListener. #

Total comments: 10

Patch Set 5 : Move changes back to offline_pages. #

Patch Set 6 : Remove unintended changes. #

Patch Set 7 : Remove unintended changes. #

Total comments: 1

Patch Set 8 : Patch without dependency. #

Patch Set 9 : Move expiring logic to observer, remove changes in offline_pages. #

Patch Set 10 : Removing debug lines. #

Total comments: 14

Patch Set 11 : Rename Owned* to OfflinePageBookmarkObserver and Impl classes. #

Total comments: 2

Patch Set 12 : Moving into bookmark_client. #

Patch Set 13 : Unnecessary changes removed. #

Patch Set 14 : Fixing conflicts. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -2 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/android/offline_pages/offline_page_bookmark_observer.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +55 lines, -0 lines 0 comments Download
A chrome/browser/android/offline_pages/offline_page_bookmark_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +53 lines, -0 lines 0 comments Download
M chrome/browser/bookmarks/chrome_bookmark_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/bookmarks/chrome_bookmark_client.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +12 lines, -0 lines 0 comments Download
M components/offline_pages/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M components/offline_pages/offline_page_model_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 54 (29 generated)
romax
PTAL, this cl would delete associated offline page when deleting a bookmark.
4 years, 4 months ago (2016-07-27 20:45:16 UTC) #6
Ian Wen
According to the bug, an offline page will be added when the user bookmarks a ...
4 years, 4 months ago (2016-07-27 21:04:01 UTC) #7
romax
On 2016/07/27 21:04:01, Ian Wen wrote: > According to the bug, an offline page will ...
4 years, 4 months ago (2016-07-27 21:51:59 UTC) #8
Dmitry Titov
Maybe even do this on C++ side? There is BookmarkModelObserver there as well.
4 years, 4 months ago (2016-07-28 00:19:29 UTC) #9
romax
PTAL. I went back to use the observer, however I haven't done it for undo ...
4 years, 4 months ago (2016-07-29 01:04:58 UTC) #10
Dmitry Titov
https://codereview.chromium.org/2185973003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java File chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java (right): https://codereview.chromium.org/2185973003/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java#newcode57 chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageBridge.java:57: private BookmarkModel mBookmarkModel; It seems weird for the OfflinePagesBridge ...
4 years, 4 months ago (2016-07-29 04:18:32 UTC) #15
Dmitry Titov
https://codereview.chromium.org/2185973003/diff/40001/chrome/browser/android/offline_pages/offline_page_model_factory.cc File chrome/browser/android/offline_pages/offline_page_model_factory.cc (right): https://codereview.chromium.org/2185973003/diff/40001/chrome/browser/android/offline_pages/offline_page_model_factory.cc#newcode27 chrome/browser/android/offline_pages/offline_page_model_factory.cc:27: DependsOn(BookmarkModelFactory::GetInstance()); Hmm, I wonder if it's a right direction ...
4 years, 4 months ago (2016-08-01 23:46:59 UTC) #16
Dmitry Titov
Sorry for delay! Some (hopefully final) comments: https://codereview.chromium.org/2185973003/diff/60001/chrome/browser/bookmarks/bookmark_model_factory.cc File chrome/browser/bookmarks/bookmark_model_factory.cc (right): https://codereview.chromium.org/2185973003/diff/60001/chrome/browser/bookmarks/bookmark_model_factory.cc#newcode77 chrome/browser/bookmarks/bookmark_model_factory.cc:77: offline_page_listener = ...
4 years, 4 months ago (2016-08-12 05:43:43 UTC) #17
romax
PTAL. Thanks! dimich@, Since anyways we'll do a load on Chrome start, I'd like to ...
4 years, 4 months ago (2016-08-16 19:05:44 UTC) #22
Lei Zhang
LGTM with dimich's approval.
4 years, 4 months ago (2016-08-16 19:10:11 UTC) #23
Dmitry Titov
https://codereview.chromium.org/2185973003/diff/160001/chrome/browser/bookmarks/bookmark_model_factory.cc File chrome/browser/bookmarks/bookmark_model_factory.cc (right): https://codereview.chromium.org/2185973003/diff/160001/chrome/browser/bookmarks/bookmark_model_factory.cc#newcode84 chrome/browser/bookmarks/bookmark_model_factory.cc:84: offline_pages::OfflinePageModelFactory::GetForBrowserContext(context) But, doesn't it remove the benefit of having ...
4 years, 4 months ago (2016-08-17 03:58:36 UTC) #24
Dmitry Titov
https://codereview.chromium.org/2185973003/diff/240001/chrome/browser/android/offline_pages/offline_page_bookmark_observer.cc File chrome/browser/android/offline_pages/offline_page_bookmark_observer.cc (right): https://codereview.chromium.org/2185973003/diff/240001/chrome/browser/android/offline_pages/offline_page_bookmark_observer.cc#newcode15 chrome/browser/android/offline_pages/offline_page_bookmark_observer.cc:15: OfflinePageBookmarkObserver::OfflinePageBookmarkObserver(Profile* profile) I'd use BrowserContext* instead of Profile* here, ...
4 years, 3 months ago (2016-08-26 23:08:59 UTC) #26
romax
zea@chromium.org: Please review changes in c/browser_sync/ and sync_bookmarks/ sky@chromium.org: Please review changes in chrome/ and ...
4 years, 3 months ago (2016-08-29 22:58:02 UTC) #33
sky
https://codereview.chromium.org/2185973003/diff/320001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/2185973003/diff/320001/components/bookmarks/browser/bookmark_model.cc#newcode115 components/bookmarks/browser/bookmark_model.cc:115: offline_page_observer_(std::move(offline_page_observer)), Why do you need OfflinePageBookmarkObserver bake into the ...
4 years, 3 months ago (2016-08-29 23:02:43 UTC) #34
romax
https://codereview.chromium.org/2185973003/diff/320001/components/bookmarks/browser/bookmark_model.cc File components/bookmarks/browser/bookmark_model.cc (right): https://codereview.chromium.org/2185973003/diff/320001/components/bookmarks/browser/bookmark_model.cc#newcode115 components/bookmarks/browser/bookmark_model.cc:115: offline_page_observer_(std::move(offline_page_observer)), On 2016/08/29 23:02:43, sky wrote: > Why do ...
4 years, 3 months ago (2016-08-29 23:21:24 UTC) #35
sky
It's better to keep the bookmarkmodel separate from code that depends upon it. To do ...
4 years, 3 months ago (2016-08-29 23:54:11 UTC) #36
romax
Thanks sky@! I think this one looks much better :) PTAL, thanks!
4 years, 3 months ago (2016-09-01 00:30:45 UTC) #38
romax
Thanks sky@! I think this one looks much better :) PTAL, thanks!
4 years, 3 months ago (2016-09-01 00:30:45 UTC) #39
sky
Thanks! LGTM
4 years, 3 months ago (2016-09-01 04:17:44 UTC) #40
Dmitry Titov
Awesome progress on this patch, glad to see! LGTM
4 years, 3 months ago (2016-09-02 18:48:12 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2185973003/360001
4 years, 3 months ago (2016-09-02 19:40:17 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/63167) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 3 months ago (2016-09-02 19:42:37 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2185973003/400001
4 years, 3 months ago (2016-09-02 19:52:00 UTC) #50
commit-bot: I haz the power
Committed patchset #14 (id:400001)
4 years, 3 months ago (2016-09-02 21:18:05 UTC) #52
commit-bot: I haz the power
4 years, 3 months ago (2016-09-02 21:20:08 UTC) #54
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/c02075fe34677d1d194b65e6b2536a3f2204640a
Cr-Commit-Position: refs/heads/master@{#416343}

Powered by Google App Engine
This is Rietveld 408576698