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

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: ... partial remediation (stay tuned...) 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 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1183 // If the tab is being prerendered, cancel the prerender and the request. 1183 // If the tab is being prerendered, cancel the prerender and the request.
1184 WebContents* tab = tab_util::GetWebContentsByID( 1184 WebContents* tab = tab_util::GetWebContentsByID(
1185 render_process_id, render_view_id); 1185 render_process_id, render_view_id);
1186 if (!tab) { 1186 if (!tab) {
1187 NOTREACHED(); 1187 NOTREACHED();
1188 return; 1188 return;
1189 } 1189 }
1190 prerender::PrerenderManager* prerender_manager = 1190 prerender::PrerenderManager* prerender_manager =
1191 prerender::PrerenderManagerFactory::GetForProfile( 1191 prerender::PrerenderManagerFactory::GetForProfile(
1192 Profile::FromBrowserContext(tab->GetBrowserContext())); 1192 Profile::FromBrowserContext(tab->GetBrowserContext()));
1193 if (prerender_manager && prerender_manager->IsWebContentsPrerendering(tab)) { 1193 if (prerender_manager && prerender_manager->IsWebContentsPrerendering(tab,
1194 NULL)) {
1194 if (prerender_manager->prerender_tracker()->TryCancel( 1195 if (prerender_manager->prerender_tracker()->TryCancel(
1195 render_process_id, render_view_id, 1196 render_process_id, render_view_id,
1196 prerender::FINAL_STATUS_SSL_ERROR)) { 1197 prerender::FINAL_STATUS_SSL_ERROR)) {
1197 *cancel_request = true; 1198 *cancel_request = true;
1198 return; 1199 return;
1199 } 1200 }
1200 } 1201 }
1201 1202
1202 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 1203 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
1203 captive_portal::CaptivePortalTabHelper* captive_portal_tab_helper = 1204 captive_portal::CaptivePortalTabHelper* captive_portal_tab_helper =
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 partition_id = extension->id(); 1804 partition_id = extension->id();
1804 } 1805 }
1805 1806
1806 // Enforce that IsValidStoragePartitionId() implementation stays in sync. 1807 // Enforce that IsValidStoragePartitionId() implementation stays in sync.
1807 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); 1808 DCHECK(IsValidStoragePartitionId(browser_context, partition_id));
1808 return partition_id; 1809 return partition_id;
1809 } 1810 }
1810 1811
1811 1812
1812 } // namespace chrome 1813 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_browsertest.cc » ('j') | chrome/browser/prerender/prerender_tab_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698