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

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

Issue 16296002: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 7 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
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 b37f3a1496b3bec7c33b72a6002be65bc40fdc18..e6917df40ee6fb0443f41fbaaaee04f2814b94b1 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.cc
+++ b/chrome/browser/predictors/resource_prefetch_predictor.cc
@@ -208,7 +208,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))
@@ -229,7 +229,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);
@@ -442,7 +442,7 @@ void ResourcePrefetchPredictor::Observe(
}
void ResourcePrefetchPredictor::Shutdown() {
- if (prefetch_manager_) {
+ if (prefetch_manager_.get()) {
prefetch_manager_->ShutdownOnUIThread();
prefetch_manager_ = NULL;
}

Powered by Google App Engine
This is Rietveld 408576698