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

Issue 16867005: Re-implement PageState serialization without a Blink API dependency. (Closed)

Created:
7 years, 6 months ago by darin (slow to review)
Modified:
7 years, 6 months ago
Reviewers:
Tom Sepez, jamesr
CC:
chromium-reviews, craigdh+watch_chromium.org, jam, joi+watch-content_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org, darin-cc_chromium.org, klundberg+watch_chromium.org, erikwright+watch_chromium.org, jshin+watch_chromium.org, frankf+watch_chromium.org
Visibility:
Public.

Description

Re-implement PageState serialization without a Blink API dependency. WebHistoryItem serialization is now split into two parts. PageState (i.e., encoded string)to ExplodedPageState, and ExplodedPageState to WebHistoryItem. This way we can generate ExplodedPageState in the browser process without a dependency on Blink API. This CL drops support for version 1-10 of the format. I confirmed with laforge@ that the usage of such old versions of Chrome is minimal enough. I've included code to extract file paths from the "document state" vector of strings. This code just has to be consistent with the way document state was generated in versions 11 through 13 of the format. Version 14 has the file path vector included directly in the serialized data. Gone is the serializers ability to write out different versions of the format. That code existed to support testing as we would write out old versions and test our ability to read them. Instead, I've captured some serialized snapshots at different versions, and I just test that we can read them. I've included code for generating a snapshot as a test case that by default returns early. (This way the code doesn't bit-rot.) R=jamesr@chromium.org,tsepez@chromium.org BUG=237243 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=208367

Patch Set 1 #

Patch Set 2 : Add specialized v11 referenced data for Android #

Patch Set 3 : Rebase #

Patch Set 4 : Fix serialized_v11_android.dat to assume a device scale factor of 2.0 #

Patch Set 5 : Move FilePath conversion to page_state.cc #

Patch Set 6 : Rebase #

Total comments: 31

Patch Set 7 : Improvements based on review feedback. #

Total comments: 15

Patch Set 8 : Rebase #

Patch Set 9 : Improvements based on Tom's feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1358 lines, -1563 lines) Patch
M build/android/pylib/gtest/test_runner.py View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A content/common/page_state_serialization.h View 1 2 3 4 5 6 1 chunk +81 lines, -0 lines 0 comments Download
A + content/common/page_state_serialization.cc View 1 2 3 4 5 6 7 8 6 chunks +446 lines, -454 lines 0 comments Download
A content/common/page_state_serialization_unittest.cc View 1 2 3 4 5 6 1 chunk +416 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 2 chunks +1 line, -1 line 0 comments Download
M content/public/common/page_state.cc View 1 2 3 4 5 6 7 8 2 chunks +114 lines, -0 lines 0 comments Download
D content/public/common/page_state_ios.cc View 1 chunk +0 lines, -43 lines 0 comments Download
M content/public/renderer/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/public/renderer/history_item_serialization.cc View 1 2 3 4 1 chunk +190 lines, -6 lines 0 comments Download
A content/test/data/page_state/serialized_v11.dat View 1 chunk +21 lines, -0 lines 0 comments Download
A content/test/data/page_state/serialized_v11_android.dat View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
A content/test/data/page_state/serialized_v12.dat View 1 chunk +21 lines, -0 lines 0 comments Download
A content/test/data/page_state/serialized_v13.dat View 1 chunk +21 lines, -0 lines 0 comments Download
A content/test/data/page_state/serialized_v14.dat View 1 chunk +20 lines, -0 lines 0 comments Download
D webkit/glue/glue_serialize_deprecated.h View 1 chunk +0 lines, -57 lines 0 comments Download
D webkit/glue/glue_serialize_deprecated.cc View 1 chunk +0 lines, -670 lines 0 comments Download
D webkit/glue/glue_serialize_unittest.cc View 1 chunk +0 lines, -328 lines 0 comments Download
M webkit/glue/webkit_glue.gypi View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
darin (slow to review)
Hi Tom, It'd be great to get your review on this change since we've discussed ...
7 years, 6 months ago (2013-06-17 23:05:34 UTC) #1
darin (slow to review)
+jamesr for code review as well
7 years, 6 months ago (2013-06-18 18:06:32 UTC) #2
jamesr
Nice! I have a fair number of comments, but most are asking to clarify things. ...
7 years, 6 months ago (2013-06-21 23:24:53 UTC) #3
jamesr
https://codereview.chromium.org/16867005/diff/36001/content/common/page_state_serialization.cc File content/common/page_state_serialization.cc (right): https://codereview.chromium.org/16867005/diff/36001/content/common/page_state_serialization.cc#newcode348 content/common/page_state_serialization.cc:348: if (INT_MAX / sizeof(base::NullableString16) <= num_elements) { rather than ...
7 years, 6 months ago (2013-06-21 23:26:52 UTC) #4
jamesr
https://codereview.chromium.org/16867005/diff/36001/content/public/common/page_state.cc File content/public/common/page_state.cc (right): https://codereview.chromium.org/16867005/diff/36001/content/public/common/page_state.cc#newcode143 content/public/common/page_state.cc:143: : data_(data) { sorry, one more thing - if ...
7 years, 6 months ago (2013-06-21 23:32:31 UTC) #5
darin (slow to review)
https://codereview.chromium.org/16867005/diff/36001/content/common/page_state_serialization.cc File content/common/page_state_serialization.cc (right): https://codereview.chromium.org/16867005/diff/36001/content/common/page_state_serialization.cc#newcode76 content/common/page_state_serialization.cc:76: const std::vector<base::NullableString16>& state, On 2013/06/21 23:24:53, jamesr wrote: > ...
7 years, 6 months ago (2013-06-24 08:02:10 UTC) #6
darin (slow to review)
jamesr: PTAL
7 years, 6 months ago (2013-06-24 17:14:48 UTC) #7
Tom Sepez
Darin, this is great. Sorry I didn't get back to you sooner, but I was ...
7 years, 6 months ago (2013-06-24 17:19:56 UTC) #8
darin (slow to review)
Thanks for the feedback Tom! PTAL https://codereview.chromium.org/16867005/diff/50001/content/common/page_state_serialization.cc File content/common/page_state_serialization.cc (right): https://codereview.chromium.org/16867005/diff/50001/content/common/page_state_serialization.cc#newcode69 content/common/page_state_serialization.cc:69: for (size_t i ...
7 years, 6 months ago (2013-06-24 18:25:44 UTC) #9
Tom Sepez
LGTM. Thanks.
7 years, 6 months ago (2013-06-24 19:12:32 UTC) #10
jamesr
lgtm
7 years, 6 months ago (2013-06-25 00:25:26 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/darin@chromium.org/16867005/67001
7 years, 6 months ago (2013-06-25 02:07:05 UTC) #12
commit-bot: I haz the power
7 years, 6 months ago (2013-06-25 03:10:28 UTC) #13
Message was sent while issue was closed.
Change committed as 208367

Powered by Google App Engine
This is Rietveld 408576698