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

Unified Diff: chrome/browser/safe_browsing/download_protection_service.cc

Issue 16290004: 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: 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/safe_browsing/download_protection_service.cc
diff --git a/chrome/browser/safe_browsing/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection_service.cc
index 5645c25943c42e959bd7986424d0115209618d3a..2700f57f13d15f79f94f2a78baa8bcc3e1b8568d 100644
--- a/chrome/browser/safe_browsing/download_protection_service.cc
+++ b/chrome/browser/safe_browsing/download_protection_service.cc
@@ -237,8 +237,8 @@ class DownloadUrlSBClient : public DownloadSBClient {
virtual void StartCheck() OVERRIDE {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- if (!database_manager_ || database_manager_->CheckDownloadUrl(
- url_chain_, this)) {
+ if (!database_manager_.get() ||
+ database_manager_->CheckDownloadUrl(url_chain_, this)) {
CheckDone(SB_THREAT_TYPE_SAFE);
} else {
AddRef(); // SafeBrowsingService takes a pointer not a scoped_refptr.
@@ -551,7 +551,7 @@ class DownloadProtectionService::CheckClientDownloadRequest
void CheckWhitelists() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DownloadCheckResultReason reason = REASON_MAX;
- if (!database_manager_) {
+ if (!database_manager_.get()) {
reason = REASON_SB_DISABLED;
} else {
for (size_t i = 0; i < url_chain_.size(); ++i) {
@@ -719,7 +719,7 @@ class DownloadProtectionService::CheckClientDownloadRequest
}
std::vector<std::string> whitelist_strings;
DownloadProtectionService::GetCertificateWhitelistStrings(
- *cert, *issuer, &whitelist_strings);
+ *cert.get(), *issuer.get(), &whitelist_strings);
for (size_t j = 0; j < whitelist_strings.size(); ++j) {
if (database_manager_->MatchDownloadWhitelistString(
whitelist_strings[j])) {
« no previous file with comments | « chrome/browser/safe_browsing/database_manager.cc ('k') | chrome/browser/safe_browsing/download_protection_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698