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

Issue 2579343002: [Offline Pages] Make new archives have random file names. (Closed)

Created:
4 years ago by dewittj
Modified:
3 years, 11 months ago
CC:
chromium-reviews, romax+watch_chromium.org, fgorski+watch_chromium.org, dewittj+watch_chromium.org, petewil+watch_chromium.org, chili+watch_chromium.org, dimich+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Offline Pages] Make new archives have random file names. Currently offline pages with the same offline ID, title and URL will produce archive files with the same filename. This leads to unexpected circumstances where archives could be overwritten even if the offline page model is not updated. This improvement also allows for more reliable updates to existing offline pages by making the update process 3-step: create an archive, then update the offline page to point to the newly created archive, then clean up the old archive. BUG=638276 Committed: https://crrev.com/26b982a36584ba683f760383210ab64a83b24bb3 Cr-Commit-Position: refs/heads/master@{#441243}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Remove unnecessary includes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -82 lines) Patch
M chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h View 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc View 1 4 chunks +2 lines, -41 lines 0 comments Download
M chrome/browser/android/offline_pages/offline_page_mhtml_archiver_unittest.cc View 1 chunk +0 lines, -33 lines 0 comments Download
M components/offline_pages/core/offline_page_model_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M components/offline_pages/core/offline_page_model_impl.cc View 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 21 (13 generated)
dewittj
PTAL, though Dmitry implied that overwriting archives /is/ actually closer to what we want than ...
3 years, 12 months ago (2016-12-23 01:23:26 UTC) #8
carlosk
LGTM after removing unneeded includes. https://codereview.chromium.org/2579343002/diff/1/chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc File chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc (right): https://codereview.chromium.org/2579343002/diff/1/chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc#newcode17 chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc:17: #include "base/strings/utf_string_conversions.h" It seems ...
3 years, 11 months ago (2016-12-30 00:11:13 UTC) #9
Pete Williamson
https://codereview.chromium.org/2579343002/diff/1/chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc File chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc (right): https://codereview.chromium.org/2579343002/diff/1/chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc#newcode98 chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc:98: archives_dir.Append(base::GenerateGUID()).AddExtension(kMHTMLExtension)); Drive by: This means that if we generate ...
3 years, 11 months ago (2017-01-03 20:32:30 UTC) #11
Dmitry Titov
lgtm
3 years, 11 months ago (2017-01-03 22:09:26 UTC) #12
dewittj
https://codereview.chromium.org/2579343002/diff/1/chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc File chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc (right): https://codereview.chromium.org/2579343002/diff/1/chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc#newcode17 chrome/browser/android/offline_pages/offline_page_mhtml_archiver.cc:17: #include "base/strings/utf_string_conversions.h" On 2016/12/30 00:11:13, carlosk wrote: > It ...
3 years, 11 months ago (2017-01-03 22:23:39 UTC) #13
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/2579343002/20001
3 years, 11 months ago (2017-01-03 22:24:20 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
3 years, 11 months ago (2017-01-03 23:16:09 UTC) #19
commit-bot: I haz the power
3 years, 11 months ago (2017-01-03 23:18:57 UTC) #21
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/26b982a36584ba683f760383210ab64a83b24bb3
Cr-Commit-Position: refs/heads/master@{#441243}

Powered by Google App Engine
This is Rietveld 408576698