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

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

Issue 129813006: Move DidReceiveServerRedirectForProvisionalLoad from RenderView to RenderFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix layout test failures. Created 6 years, 11 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 | Annotate | Revision Log
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 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 1178
1179 merge_timeout_.Start( 1179 merge_timeout_.Start(
1180 FROM_HERE, 1180 FROM_HERE,
1181 base::TimeDelta::FromMilliseconds( 1181 base::TimeDelta::FromMilliseconds(
1182 kSessionStorageNamespaceMergeTimeoutMs), 1182 kSessionStorageNamespaceMergeTimeoutMs),
1183 this, &PrerenderManager::PendingSwap::OnMergeTimeout); 1183 this, &PrerenderManager::PendingSwap::OnMergeTimeout);
1184 } 1184 }
1185 1185
1186 void PrerenderManager::PendingSwap::ProvisionalChangeToMainFrameUrl( 1186 void PrerenderManager::PendingSwap::ProvisionalChangeToMainFrameUrl(
1187 const GURL& url, 1187 const GURL& url,
1188 content::RenderViewHost* render_view_host) { 1188 content::RenderFrameHost* render_frame_host) {
1189 // We must only cancel the pending swap if the |url| navigated to is not 1189 // We must only cancel the pending swap if the |url| navigated to is not
1190 // the URL being attempted to be swapped in. That's because in the normal 1190 // the URL being attempted to be swapped in. That's because in the normal
1191 // flow, a ProvisionalChangeToMainFrameUrl will happen for the URL attempted 1191 // flow, a ProvisionalChangeToMainFrameUrl will happen for the URL attempted
1192 // to be swapped in immediately after the pending swap has issued its merge. 1192 // to be swapped in immediately after the pending swap has issued its merge.
1193 if (url != url_) 1193 if (url != url_)
1194 prerender_data_->ClearPendingSwap(); 1194 prerender_data_->ClearPendingSwap();
1195 } 1195 }
1196 1196
1197 void PrerenderManager::PendingSwap::DidCommitProvisionalLoadForFrame( 1197 void PrerenderManager::PendingSwap::DidCommitProvisionalLoadForFrame(
1198 int64 frame_id, 1198 int64 frame_id,
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1867 void PrerenderManager::RecordEvent(PrerenderContents* contents, 1867 void PrerenderManager::RecordEvent(PrerenderContents* contents,
1868 PrerenderEvent event) const { 1868 PrerenderEvent event) const {
1869 if (!contents) 1869 if (!contents)
1870 histograms_->RecordEvent(ORIGIN_NONE, kNoExperiment, event); 1870 histograms_->RecordEvent(ORIGIN_NONE, kNoExperiment, event);
1871 else 1871 else
1872 histograms_->RecordEvent(contents->origin(), contents->experiment_id(), 1872 histograms_->RecordEvent(contents->origin(), contents->experiment_id(),
1873 event); 1873 event);
1874 } 1874 }
1875 1875
1876 } // namespace prerender 1876 } // 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