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

Unified Diff: content/shell/webkit_test_controller.cc

Issue 14985014: Introduce content::PageState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments to the top of page_state.h Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/shell/webkit_test_controller.cc
diff --git a/content/shell/webkit_test_controller.cc b/content/shell/webkit_test_controller.cc
index 7239ed1045438a0c655f41603d59b0eefbec2e68..e96e2c0eccfec1485f0fed78b62bcbcc188a4316 100644
--- a/content/shell/webkit_test_controller.cc
+++ b/content/shell/webkit_test_controller.cc
@@ -29,7 +29,6 @@
#include "content/shell/shell.h"
#include "content/shell/shell_browser_context.h"
#include "content/shell/shell_content_browser_client.h"
-#include "webkit/glue/glue_serialize.h"
#include "webkit/support/webkit_support_gfx.h"
namespace content {
@@ -565,7 +564,7 @@ void WebKitTestController::OnLoadURLForFrame(const GURL& url,
void WebKitTestController::OnCaptureSessionHistory() {
std::vector<int> routing_ids;
- std::vector<std::vector<std::string> > session_histories;
+ std::vector<std::vector<PageState> > session_histories;
std::vector<unsigned> current_entry_indexes;
RenderViewHost* render_view_host =
@@ -587,13 +586,13 @@ void WebKitTestController::OnCaptureSessionHistory() {
routing_ids.push_back(web_contents->GetRenderViewHost()->GetRoutingID());
current_entry_indexes.push_back(
web_contents->GetController().GetCurrentEntryIndex());
- std::vector<std::string> history;
+ std::vector<PageState> history;
for (int entry = 0; entry < web_contents->GetController().GetEntryCount();
++entry) {
- std::string state = web_contents->GetController().GetEntryAtIndex(entry)
- ->GetContentState();
- if (state.empty()) {
- state = webkit_glue::CreateHistoryStateForURL(
+ PageState state = web_contents->GetController().GetEntryAtIndex(entry)->
+ GetPageState();
+ if (!state.IsValid()) {
+ state = PageState::CreateFromURL(
web_contents->GetController().GetEntryAtIndex(entry)->GetURL());
}
history.push_back(state);

Powered by Google App Engine
This is Rietveld 408576698