| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_tracker.h" | 5 #include "chrome/browser/prerender/prerender_tracker.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/prerender/prerender_manager.h" | 9 #include "chrome/browser/prerender/prerender_manager.h" |
| 10 #include "content/browser/browser_thread.h" | 10 #include "content/browser/browser_thread.h" |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 if (actual_final_status) | 280 if (actual_final_status) |
| 281 *actual_final_status = FINAL_STATUS_MAX; | 281 *actual_final_status = FINAL_STATUS_MAX; |
| 282 return false; | 282 return false; |
| 283 } | 283 } |
| 284 | 284 |
| 285 if (final_status_it->second.final_status == FINAL_STATUS_MAX) { | 285 if (final_status_it->second.final_status == FINAL_STATUS_MAX) { |
| 286 final_status_it->second.final_status = desired_final_status; | 286 final_status_it->second.final_status = desired_final_status; |
| 287 if (desired_final_status != FINAL_STATUS_USED) { | 287 if (desired_final_status != FINAL_STATUS_USED) { |
| 288 BrowserThread::PostTask( | 288 BrowserThread::PostTask( |
| 289 BrowserThread::UI, FROM_HERE, | 289 BrowserThread::UI, FROM_HERE, |
| 290 NewRunnableFunction(&DestroyPreloadForRenderView, | 290 NewRunnableFunction(&DestroyPrerenderForRenderView, |
| 291 final_status_it->second.prerender_manager, | 291 final_status_it->second.prerender_manager, |
| 292 child_id, | 292 child_id, |
| 293 route_id, | 293 route_id, |
| 294 desired_final_status)); | 294 desired_final_status)); |
| 295 } | 295 } |
| 296 | 296 |
| 297 if (actual_final_status) | 297 if (actual_final_status) |
| 298 *actual_final_status = desired_final_status; | 298 *actual_final_status = desired_final_status; |
| 299 return true; | 299 return true; |
| 300 } | 300 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 GetDefault()->AddPrerenderOnIOThread(child_route_id_pair); | 342 GetDefault()->AddPrerenderOnIOThread(child_route_id_pair); |
| 343 } | 343 } |
| 344 | 344 |
| 345 // static | 345 // static |
| 346 void PrerenderTracker::RemovePrerenderOnIOThreadTask( | 346 void PrerenderTracker::RemovePrerenderOnIOThreadTask( |
| 347 const ChildRouteIdPair& child_route_id_pair) { | 347 const ChildRouteIdPair& child_route_id_pair) { |
| 348 GetDefault()->RemovePrerenderOnIOThread(child_route_id_pair); | 348 GetDefault()->RemovePrerenderOnIOThread(child_route_id_pair); |
| 349 } | 349 } |
| 350 | 350 |
| 351 } // namespace prerender | 351 } // namespace prerender |
| OLD | NEW |