Chromium Code Reviews| Index: chrome/browser/ui/browser_commands.cc |
| diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc |
| index 4000083732f8b3a95f64077404c6725a9fc57d2a..fd1c0adf77e95dedc17aede0ec10c19c3cf927e7 100644 |
| --- a/chrome/browser/ui/browser_commands.cc |
| +++ b/chrome/browser/ui/browser_commands.cc |
| @@ -73,7 +73,6 @@ |
| #include "content/public/common/url_utils.h" |
| #include "net/base/escape.h" |
| #include "webkit/common/user_agent/user_agent_util.h" |
| -#include "webkit/glue/glue_serialize.h" |
| #if defined(OS_MACOSX) |
| #include "ui/base/cocoa/find_pasteboard.h" |
| @@ -996,13 +995,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); |
| @@ -1020,8 +1019,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()); |
|
Tom Sepez
2013/05/24 17:46:49
Do we similarly want to strip out the referenced f
|
| // Do not restore title, derive it from the url. |
| active_entry->SetTitle(string16()); |