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

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

Issue 547703003: CL for perf tryjob (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | tools/run-perf-test.cfg » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/prerender/prerender_manager.h" 5 #include "chrome/browser/prerender/prerender_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 1397
1398 // Measure how long the resource checks took. http://crbug.com/305419. 1398 // Measure how long the resource checks took. http://crbug.com/305419.
1399 UMA_HISTOGRAM_TIMES("Prerender.PeriodicCleanupResourceCheckTime", 1399 UMA_HISTOGRAM_TIMES("Prerender.PeriodicCleanupResourceCheckTime",
1400 resource_timer.Elapsed()); 1400 resource_timer.Elapsed());
1401 1401
1402 base::ElapsedTimer cleanup_timer; 1402 base::ElapsedTimer cleanup_timer;
1403 1403
1404 // Perform deferred cleanup work. 1404 // Perform deferred cleanup work.
1405 DeleteOldWebContents(); 1405 DeleteOldWebContents();
1406 DeleteOldEntries(); 1406 DeleteOldEntries();
1407 if (active_prerenders_.empty()) 1407 if (GetAllPrerenderingContents().empty())
1408 StopSchedulingPeriodicCleanups(); 1408 StopSchedulingPeriodicCleanups();
1409 1409
1410 to_delete_prerenders_.clear(); 1410 to_delete_prerenders_.clear();
1411 1411
1412 // Measure how long a the various cleanup tasks took. http://crbug.com/305419. 1412 // Measure how long a the various cleanup tasks took. http://crbug.com/305419.
1413 UMA_HISTOGRAM_TIMES("Prerender.PeriodicCleanupDeleteContentsTime", 1413 UMA_HISTOGRAM_TIMES("Prerender.PeriodicCleanupDeleteContentsTime",
1414 cleanup_timer.Elapsed()); 1414 cleanup_timer.Elapsed());
1415 } 1415 }
1416 1416
1417 void PrerenderManager::PostCleanupTask() { 1417 void PrerenderManager::PostCleanupTask() {
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 content::RenderProcessHost* host) { 1885 content::RenderProcessHost* host) {
1886 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1886 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1887 prerender_process_hosts_.erase(host); 1887 prerender_process_hosts_.erase(host);
1888 BrowserThread::PostTask( 1888 BrowserThread::PostTask(
1889 BrowserThread::IO, FROM_HERE, 1889 BrowserThread::IO, FROM_HERE,
1890 base::Bind(&PrerenderTracker::RemovePrerenderCookieStoreOnIOThread, 1890 base::Bind(&PrerenderTracker::RemovePrerenderCookieStoreOnIOThread,
1891 base::Unretained(prerender_tracker()), host->GetID(), false)); 1891 base::Unretained(prerender_tracker()), host->GetID(), false));
1892 } 1892 }
1893 1893
1894 } // namespace prerender 1894 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | tools/run-perf-test.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698