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

Side by Side Diff: chrome/browser/prerender/prerender_manager.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/prerender/prerender_manager.h" 5 #include "chrome/browser/prerender/prerender_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 // the URL being attempted to be swapped in. That's because in the normal 1103 // the URL being attempted to be swapped in. That's because in the normal
1104 // flow, a ProvisionalChangeToMainFrameUrl will happen for the URL attempted 1104 // flow, a ProvisionalChangeToMainFrameUrl will happen for the URL attempted
1105 // to be swapped in immediately after the pending swap has issued its merge. 1105 // to be swapped in immediately after the pending swap has issued its merge.
1106 if (url != url_) 1106 if (url != url_)
1107 prerender_data_->ClearPendingSwap(); 1107 prerender_data_->ClearPendingSwap();
1108 } 1108 }
1109 1109
1110 void PrerenderManager::PendingSwap::DidCommitProvisionalLoadForFrame( 1110 void PrerenderManager::PendingSwap::DidCommitProvisionalLoadForFrame(
1111 content::RenderFrameHost* render_frame_host, 1111 content::RenderFrameHost* render_frame_host,
1112 const GURL& validated_url, 1112 const GURL& validated_url,
1113 content::PageTransition transition_type) { 1113 ui::PageTransition transition_type) {
1114 if (render_frame_host->GetParent()) 1114 if (render_frame_host->GetParent())
1115 return; 1115 return;
1116 prerender_data_->ClearPendingSwap(); 1116 prerender_data_->ClearPendingSwap();
1117 } 1117 }
1118 1118
1119 void PrerenderManager::PendingSwap::DidFailProvisionalLoad( 1119 void PrerenderManager::PendingSwap::DidFailProvisionalLoad(
1120 content::RenderFrameHost* render_frame_host, 1120 content::RenderFrameHost* render_frame_host,
1121 const GURL& validated_url, 1121 const GURL& validated_url,
1122 int error_code, 1122 int error_code,
1123 const base::string16& error_description) { 1123 const base::string16& error_description) {
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1888 content::RenderProcessHost* host) { 1888 content::RenderProcessHost* host) {
1889 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1889 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1890 prerender_process_hosts_.erase(host); 1890 prerender_process_hosts_.erase(host);
1891 BrowserThread::PostTask( 1891 BrowserThread::PostTask(
1892 BrowserThread::IO, FROM_HERE, 1892 BrowserThread::IO, FROM_HERE,
1893 base::Bind(&PrerenderTracker::RemovePrerenderCookieStoreOnIOThread, 1893 base::Bind(&PrerenderTracker::RemovePrerenderCookieStoreOnIOThread,
1894 base::Unretained(prerender_tracker()), host->GetID(), false)); 1894 base::Unretained(prerender_tracker()), host->GetID(), false));
1895 } 1895 }
1896 1896
1897 } // namespace prerender 1897 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_manager.h ('k') | chrome/browser/prerender/prerender_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698