From 29471ff8b506c5c7ee5fa92d66b7c6c1547f9247 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 9 Mar 2015 13:46:46 -0700 Subject: [PATCH] Fix styling of #1209 --- atom/browser/api/atom_api_web_contents.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index b1426c98edde..4003820b6296 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -267,11 +267,8 @@ void WebContents::WebContentsDestroyed() { void WebContents::NavigationEntryCommitted( const content::LoadCommittedDetails& load_details) { - content::NavigationEntry* entry = load_details.entry; - web_contents() - ->GetController() - .GetLastCommittedEntry() - ->SetVirtualURL(entry->GetOriginalRequestURL()); + auto entry = web_contents()->GetController().GetLastCommittedEntry(); + entry->SetVirtualURL(load_details.entry->GetOriginalRequestURL()); } void WebContents::DidAttach(int guest_proxy_routing_id) { @@ -333,10 +330,8 @@ void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) { } GURL WebContents::GetURL() const { - return web_contents() - ->GetController() - .GetLastCommittedEntry() - ->GetVirtualURL(); + auto entry = web_contents()->GetController().GetLastCommittedEntry(); + return entry->GetVirtualURL(); } base::string16 WebContents::GetTitle() const {