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

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 14985014: Introduce content::PageState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compilation issues. 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: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index cd1668358320fb601fb933d211177258a3768438..61e1eefe9d2f47956cb66aa7a952c69a759a9954 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -72,7 +72,6 @@
#include "content/public/common/renderer_preferences.h"
#include "content/public/common/url_constants.h"
#include "net/base/escape.h"
-#include "webkit/glue/glue_serialize.h"
#include "webkit/user_agent/user_agent_util.h"
#if defined(OS_MACOSX)
@@ -991,13 +990,13 @@ void ViewSource(Browser* browser, WebContents* contents) {
if (!entry)
return;
- ViewSource(browser, contents, entry->GetURL(), entry->GetContentState());
+ ViewSource(browser, contents, entry->GetURL(), entry->GetPageState());
}
void ViewSource(Browser* browser,
WebContents* contents,
const GURL& url,
- const std::string& content_state) {
+ const content::PageState& page_state) {
content::RecordAction(UserMetricsAction("ViewSource"));
DCHECK(contents);
@@ -1015,8 +1014,7 @@ void ViewSource(Browser* browser,
active_entry->SetVirtualURL(view_source_url);
// Do not restore scroller position.
- active_entry->SetContentState(
- webkit_glue::RemoveScrollOffsetFromHistoryState(content_state));
+ active_entry->SetPageState(page_state.RemoveScrollOffset());
// Do not restore title, derive it from the url.
active_entry->SetTitle(string16());

Powered by Google App Engine
This is Rietveld 408576698