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

Unified Diff: chrome/browser/predictors/resource_prefetch_predictor.cc

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/predictors/resource_prefetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/predictors/resource_prefetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698