summaryrefslogtreecommitdiffstats
path: root/content/shell/common
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 22:00:59 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-24 22:00:59 +0000
commitf66375e4d724f5da1a406d553259685451cdf55d (patch)
tree25ecde7778c92926a814fd6ae4bc1acc42a2ae38 /content/shell/common
parent28b81067d7fa71d061d807267a1ac09f5e4fbd12 (diff)
downloadchromium_src-f66375e4d724f5da1a406d553259685451cdf55d.zip
chromium_src-f66375e4d724f5da1a406d553259685451cdf55d.tar.gz
chromium_src-f66375e4d724f5da1a406d553259685451cdf55d.tar.bz2
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 Review URL: https://codereview.chromium.org/14985014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202188 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/common')
-rw-r--r--content/shell/common/shell_messages.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/content/shell/common/shell_messages.h b/content/shell/common/shell_messages.h
index 37d60e98..df490b3 100644
--- a/content/shell/common/shell_messages.h
+++ b/content/shell/common/shell_messages.h
@@ -7,6 +7,7 @@
#include <vector>
#include "content/public/common/common_param_traits.h"
+#include "content/public/common/page_state.h"
#include "content/shell/common/shell_test_configuration.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/ipc_platform_file.h"
@@ -51,7 +52,7 @@ IPC_MESSAGE_ROUTED0(ShellViewMsg_NotifyDone)
IPC_MESSAGE_ROUTED3(
ShellViewMsg_SessionHistory,
std::vector<int> /* routing_ids */,
- std::vector<std::vector<std::string> > /* session_histories */,
+ std::vector<std::vector<content::PageState> > /* session_histories */,
std::vector<unsigned> /* current_entry_indexes */)
// Send a text dump of the WebContents to the render host.