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/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 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1350 prerender_contents->prerendering_has_started() || | 1350 prerender_contents->prerendering_has_started() || |
1351 (origin == ORIGIN_LOCAL_PREDICTOR && | 1351 (origin == ORIGIN_LOCAL_PREDICTOR && |
1352 IsLocalPredictorPrerenderAlwaysControlEnabled())); | 1352 IsLocalPredictorPrerenderAlwaysControlEnabled())); |
1353 | 1353 |
1354 if (GetMode() == PRERENDER_MODE_EXPERIMENT_MULTI_PRERENDER_GROUP) | 1354 if (GetMode() == PRERENDER_MODE_EXPERIMENT_MULTI_PRERENDER_GROUP) |
1355 histograms_->RecordConcurrency(active_prerenders_.size()); | 1355 histograms_->RecordConcurrency(active_prerenders_.size()); |
1356 | 1356 |
1357 // Query the history to see if the URL being prerendered has ever been | 1357 // Query the history to see if the URL being prerendered has ever been |
1358 // visited before. | 1358 // visited before. |
1359 HistoryService* history_service = HistoryServiceFactory::GetForProfile( | 1359 HistoryService* history_service = HistoryServiceFactory::GetForProfile( |
1360 profile_, Profile::EXPLICIT_ACCESS); | 1360 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
1361 if (history_service) { | 1361 if (history_service) { |
1362 history_service->QueryURL( | 1362 history_service->QueryURL( |
1363 url, | 1363 url, |
1364 false, | 1364 false, |
1365 base::Bind(&PrerenderManager::OnHistoryServiceDidQueryURL, | 1365 base::Bind(&PrerenderManager::OnHistoryServiceDidQueryURL, |
1366 base::Unretained(this), | 1366 base::Unretained(this), |
1367 origin, | 1367 origin, |
1368 experiment), | 1368 experiment), |
1369 &query_url_tracker_); | 1369 &query_url_tracker_); |
1370 } | 1370 } |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 content::RenderProcessHost* host) { | 1896 content::RenderProcessHost* host) { |
1897 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1897 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1898 prerender_process_hosts_.erase(host); | 1898 prerender_process_hosts_.erase(host); |
1899 BrowserThread::PostTask( | 1899 BrowserThread::PostTask( |
1900 BrowserThread::IO, FROM_HERE, | 1900 BrowserThread::IO, FROM_HERE, |
1901 base::Bind(&PrerenderTracker::RemovePrerenderCookieStoreOnIOThread, | 1901 base::Bind(&PrerenderTracker::RemovePrerenderCookieStoreOnIOThread, |
1902 base::Unretained(prerender_tracker()), host->GetID(), false)); | 1902 base::Unretained(prerender_tracker()), host->GetID(), false)); |
1903 } | 1903 } |
1904 | 1904 |
1905 } // namespace prerender | 1905 } // namespace prerender |
OLD | NEW |