OLD | NEW |
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 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 // If the tab is being prerendered, cancel the prerender and the request. | 1190 // If the tab is being prerendered, cancel the prerender and the request. |
1191 WebContents* tab = tab_util::GetWebContentsByID( | 1191 WebContents* tab = tab_util::GetWebContentsByID( |
1192 render_process_id, render_view_id); | 1192 render_process_id, render_view_id); |
1193 if (!tab) { | 1193 if (!tab) { |
1194 NOTREACHED(); | 1194 NOTREACHED(); |
1195 return; | 1195 return; |
1196 } | 1196 } |
1197 prerender::PrerenderManager* prerender_manager = | 1197 prerender::PrerenderManager* prerender_manager = |
1198 prerender::PrerenderManagerFactory::GetForProfile( | 1198 prerender::PrerenderManagerFactory::GetForProfile( |
1199 Profile::FromBrowserContext(tab->GetBrowserContext())); | 1199 Profile::FromBrowserContext(tab->GetBrowserContext())); |
1200 if (prerender_manager && prerender_manager->IsWebContentsPrerendering(tab)) { | 1200 if (prerender_manager && prerender_manager->IsWebContentsPrerendering(tab, |
| 1201 NULL)) { |
1201 if (prerender_manager->prerender_tracker()->TryCancel( | 1202 if (prerender_manager->prerender_tracker()->TryCancel( |
1202 render_process_id, render_view_id, | 1203 render_process_id, render_view_id, |
1203 prerender::FINAL_STATUS_SSL_ERROR)) { | 1204 prerender::FINAL_STATUS_SSL_ERROR)) { |
1204 *cancel_request = true; | 1205 *cancel_request = true; |
1205 return; | 1206 return; |
1206 } | 1207 } |
1207 } | 1208 } |
1208 | 1209 |
1209 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) | 1210 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION) |
1210 captive_portal::CaptivePortalTabHelper* captive_portal_tab_helper = | 1211 captive_portal::CaptivePortalTabHelper* captive_portal_tab_helper = |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1846 partition_id = extension->id(); | 1847 partition_id = extension->id(); |
1847 } | 1848 } |
1848 | 1849 |
1849 // Enforce that IsValidStoragePartitionId() implementation stays in sync. | 1850 // Enforce that IsValidStoragePartitionId() implementation stays in sync. |
1850 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); | 1851 DCHECK(IsValidStoragePartitionId(browser_context, partition_id)); |
1851 return partition_id; | 1852 return partition_id; |
1852 } | 1853 } |
1853 | 1854 |
1854 | 1855 |
1855 } // namespace chrome | 1856 } // namespace chrome |
OLD | NEW |