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

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

Issue 7210020: Added prerendering to omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 9 years, 6 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) 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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_origin.cc ('k') | chrome/browser/prerender/prerender_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698