| Index: chrome/browser/predictors/resource_prefetch_predictor.cc
|
| diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc
|
| index 48d37b0f1023c11daed2d7adaddfd438d4dd838a..44c28bd54eb02ee19d2fa022a95ef312b17b96f0 100644
|
| --- a/chrome/browser/predictors/resource_prefetch_predictor.cc
|
| +++ b/chrome/browser/predictors/resource_prefetch_predictor.cc
|
| @@ -177,7 +177,7 @@ ResourcePrefetchPredictor::~ResourcePrefetchPredictor() {
|
| }
|
|
|
| void ResourcePrefetchPredictor::Shutdown() {
|
| - if (prefetch_manager_) {
|
| + if (prefetch_manager_.get()) {
|
| prefetch_manager_->ShutdownOnUIThread();
|
| prefetch_manager_ = NULL;
|
| }
|
| @@ -228,7 +228,7 @@ void ResourcePrefetchPredictor::CreateCaches(
|
|
|
| // Add notifications for history loading if it is not ready.
|
| HistoryService* history_service = HistoryServiceFactory::GetForProfile(
|
| - profile_, Profile::EXPLICIT_ACCESS);
|
| + profile_, Profile::EXPLICIT_ACCESS).get();
|
| if (!history_service) {
|
| notification_registrar_.Add(this, chrome::NOTIFICATION_HISTORY_LOADED,
|
| content::Source<Profile>(profile_));
|
| @@ -301,7 +301,7 @@ bool ResourcePrefetchPredictor::IsHandledSubresource(
|
| resource_status |= RESOURCE_STATUS_URL_TOO_LONG;
|
| }
|
|
|
| - if (!response->response_info().headers)
|
| + if (!response->response_info().headers.get())
|
| resource_status |= RESOURCE_STATUS_HEADERS_MISSING;
|
|
|
| if (!IsCacheable(response))
|
| @@ -322,7 +322,7 @@ bool ResourcePrefetchPredictor::IsCacheable(const net::URLRequest* response) {
|
| // For non cached responses, we will ensure that the freshness lifetime is
|
| // some sane value.
|
| const net::HttpResponseInfo& response_info = response->response_info();
|
| - if (!response_info.headers)
|
| + if (!response_info.headers.get())
|
| return false;
|
| base::Time response_time(response_info.response_time);
|
| response_time += base::TimeDelta::FromSeconds(1);
|
| @@ -670,7 +670,7 @@ void ResourcePrefetchPredictor::OnNavigationComplete(
|
|
|
| // Kick off history lookup to determine if we should record the URL.
|
| HistoryService* history_service = HistoryServiceFactory::GetForProfile(
|
| - profile_, Profile::EXPLICIT_ACCESS);
|
| + profile_, Profile::EXPLICIT_ACCESS).get();
|
| DCHECK(history_service);
|
| history_service->ScheduleDBTask(
|
| new GetUrlVisitCountTask(
|
|
|