]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix styling of #1209
authorCheng Zhao <zcbenz@gmail.com>
Mon, 9 Mar 2015 20:46:46 +0000 (13:46 -0700)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 9 Mar 2015 20:46:46 +0000 (13:46 -0700)
atom/browser/api/atom_api_web_contents.cc

index b1426c98eddeac3bd9e52ca4e9ff5a66125e93a4..4003820b6296fddd2c0bc9cff959e272d0134892 100644 (file)
@@ -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 {