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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 11028037: Fix prerender histograms for multiple prerender case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: further remediation Created 8 years, 2 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 // If the tab is being prerendered, cancel the prerender and the request. 1189 // If the tab is being prerendered, cancel the prerender and the request.
1190 WebContents* tab = tab_util::GetWebContentsByID( 1190 WebContents* tab = tab_util::GetWebContentsByID(
1191 render_process_id, render_view_id); 1191 render_process_id, render_view_id);
1192 if (!tab) { 1192 if (!tab) {
1193 NOTREACHED(); 1193 NOTREACHED();
1194 return; 1194 return;
1195 } 1195 }
1196 prerender::PrerenderManager* prerender_manager = 1196 prerender::PrerenderManager* prerender_manager =
1197 prerender::PrerenderManagerFactory::GetForProfile( 1197 prerender::PrerenderManagerFactory::GetForProfile(
1198 Profile::FromBrowserContext(tab->GetBrowserContext())); 1198 Profile::FromBrowserContext(tab->GetBrowserContext()));
1199 if (prerender_manager && prerender_manager->IsWebContentsPrerendering(tab)) { 1199 if (prerender_manager && prerender_manager->IsWebContentsPrerendering(tab,
1200 NULL)) {
1200 if (prerender_manager->prerender_tracker()->TryCancel( 1201 if (prerender_manager->prerender_tracker()->TryCancel(
1201 render_process_id, render_view_id, 1202 render_process_id, render_view_id,
1202 prerender::FINAL_STATUS_SSL_ERROR)) { 1203 prerender::FINAL_STATUS_SSL_ERROR)) {
1203 *cancel_request = true; 1204 *cancel_request = true;
1204 return; 1205 return;
1205 } 1206 }
1206 } 1207 }
1207 1208
1208 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 1209 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
1209 captive_portal::CaptivePortalTabHelper* captive_portal_tab_helper = 1210 captive_portal::CaptivePortalTabHelper* captive_portal_tab_helper =
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1839 partition_id = extension->id(); 1840 partition_id = extension->id();
1840 } 1841 }
1841 1842
1842 // Enforce that IsValidStoragePartitionId() implementation stays in sync. 1843 // Enforce that IsValidStoragePartitionId() implementation stays in sync.
1843 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); 1844 DCHECK(IsValidStoragePartitionId(browser_context, partition_id));
1844 return partition_id; 1845 return partition_id;
1845 } 1846 }
1846 1847
1847 1848
1848 } // namespace chrome 1849 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_browsertest.cc » ('j') | chrome/browser/prerender/prerender_histograms.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698