|
Introduce content::PageState.
This is a concrete class wrapping a string that contains the
data of a serialized WebKit::WebHistoryItem class. Previously,
we've just passed around these as strings, giving them names
like "state", "content_state" or "history_state". It has been
hard to identify all of the places in the code where these
strings get passed around. A concrete class should make usage
more apparent. Plus, instead of manipulating the strings using
methods from webkit/glue/glue_serialize.h, we can just declare
methods on the PageState class. This makes the code much cleaner.
This first pass just implements PageState in terms of glue_serialize.
It also adds content/public/renderer/history_item_serialization.h
as the home for PageState to WebKit::WebHistoryItem conversion,
which should ideally only be usable from the renderer process.
(This bit is a step toward resolving bug 237243.)
page_state.h declares operator==() to support DCHECK_EQ, which
seems consistent with the idea of PageState being a replacement
for std::string. I didn't want to litter tests with calls to
PageState::ToEncodedData(). That would get cumbersome.
BUG= 240426
R=brettw@chromium.org, tsepez@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202188
Total comments: 2
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+541 lines, -980 lines) |
Patch |
 |
M |
android_webview/native/state_serializer.cc
|
View
|
1
2
3
4
5
6
7
8
|
3 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
android_webview/native/state_serializer_unittests.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sessions/session_restore.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sessions/session_service_unittest.cc
|
View
|
1
2
|
5 chunks |
+18 lines, -31 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sessions/session_types_unittest.cc
|
View
|
1
2
|
3 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/tab_contents/render_view_context_menu.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/browser.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/browser.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/browser_commands.h
|
View
|
1
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/browser_commands.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
3 chunks |
+3 lines, -5 lines |
1 comment
|
Download
|
 |
M |
components/sessions/serialized_navigation_entry.h
|
View
|
1
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/sessions/serialized_navigation_entry.cc
|
View
|
1
2
|
7 chunks |
+14 lines, -13 lines |
0 comments
|
Download
|
 |
M |
components/sessions/serialized_navigation_entry_test_helper.h
|
View
|
1
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/sessions/serialized_navigation_entry_test_helper.cc
|
View
|
1
2
|
2 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
components/sessions/serialized_navigation_entry_unittest.cc
|
View
|
1
2
|
8 chunks |
+9 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_view_host_delegate.h
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_view_host_impl.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_view_host_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
4 chunks |
+7 lines, -9 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/test_render_view_host.cc
|
View
|
1
2
|
4 chunks |
+12 lines, -27 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/navigation_controller_impl.cc
|
View
|
1
2
|
4 chunks |
+6 lines, -9 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/navigation_controller_impl_unittest.cc
|
View
|
1
2
|
20 chunks |
+19 lines, -19 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/navigation_entry_impl.h
|
View
|
|
3 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/navigation_entry_impl.cc
|
View
|
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/navigation_entry_impl_unittest.cc
|
View
|
1
2
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/render_view_host_manager_unittest.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/web_contents_impl.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/web_contents_impl.cc
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
content/browser/web_contents/web_contents_impl_unittest.cc
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+11 lines, -12 lines |
0 comments
|
Download
|
 |
M |
content/common/view_messages.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
5 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/content_common.gypi
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/content_renderer.gypi
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/browser/navigation_entry.h
|
View
|
|
3 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/public/browser/web_contents.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/public/browser/web_contents_delegate.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/public/browser/web_contents_delegate.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
content/public/common/common_param_traits.h
|
View
|
1
2
3
4
5
|
2 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/common/common_param_traits.cc
|
View
|
1
2
|
2 chunks |
+22 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/common/context_menu_params.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
A |
content/public/common/page_state.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+66 lines, -0 lines |
3 comments
|
Download
|
 |
A |
content/public/common/page_state.cc
|
View
|
1
2
3
|
1 chunk |
+87 lines, -0 lines |
1 comment
|
Download
|
 |
A |
content/public/common/page_state_ios.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+70 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/public/renderer/history_item_serialization.h
|
View
|
1
|
1 chunk |
+26 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/public/renderer/history_item_serialization.cc
|
View
|
1
2
|
1 chunk |
+21 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/public/test/render_view_fake_resources_test.cc
|
View
|
1
|
3 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/public/test/render_view_test.cc
|
View
|
1
|
3 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/renderer/context_menu_params_builder.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+3 lines, -5 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_view_browsertest.cc
|
View
|
1
2
3
4
5
|
20 chunks |
+21 lines, -21 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_view_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
7 chunks |
+11 lines, -12 lines |
1 comment
|
Download
|
 |
M |
content/shell/common/shell_messages.h
|
View
|
1
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/shell/renderer/webkit_test_runner.h
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/shell/renderer/webkit_test_runner.cc
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/shell/webkit_test_controller.cc
|
View
|
1
2
|
3 chunks |
+6 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/test/test_web_contents.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
D |
webkit/glue/glue_serialize.h
|
View
|
|
1 chunk |
+0 lines, -57 lines |
0 comments
|
Download
|
 |
D |
webkit/glue/glue_serialize.cc
|
View
|
1
|
1 chunk |
+0 lines, -668 lines |
0 comments
|
Download
|
 |
A + |
webkit/glue/glue_serialize_deprecated.h
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
A + |
webkit/glue/glue_serialize_deprecated.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
webkit/glue/glue_serialize_unittest.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
webkit/glue/webkit_glue.gypi
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 14 (0 generated)
|