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

Unified Diff: chrome/browser/safe_browsing/client_side_detection_host.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
Index: chrome/browser/safe_browsing/client_side_detection_host.cc
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index ce244104bbe9b8daa08bcf2d9357b7e9f77cfe2e..3ddfc2e19c8d6cf163091a30ea2e77d86b638c20 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -161,7 +161,7 @@ class ClientSideDetectionHost::ShouldClassifyUrlRequest
void CheckCsdWhitelist(const GURL& url) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- if (!sb_service_ || sb_service_->MatchCsdWhitelistUrl(url)) {
+ if (!sb_service_.get() || sb_service_->MatchCsdWhitelistUrl(url)) {
// We're done. There is no point in going back to the UI thread.
VLOG(1) << "Skipping phishing classification for URL: " << url
<< " because it matches the csd whitelist";
@@ -252,13 +252,13 @@ ClientSideDetectionHost::ClientSideDetectionHost(WebContents* tab)
// Note: csd_service_ and sb_service_ will be NULL here in testing.
registrar_.Add(this, content::NOTIFICATION_RESOURCE_RESPONSE_STARTED,
content::Source<WebContents>(tab));
- if (sb_service_) {
+ if (sb_service_.get()) {
sb_service_->AddObserver(this);
}
}
ClientSideDetectionHost::~ClientSideDetectionHost() {
- if (sb_service_) {
+ if (sb_service_.get()) {
sb_service_->RemoveObserver(this);
}
}
@@ -315,7 +315,7 @@ void ClientSideDetectionHost::DidNavigateMainFrame(
classification_request_ = new ShouldClassifyUrlRequest(params,
web_contents(),
csd_service_,
- sb_service_,
+ sb_service_.get(),
this);
classification_request_->Start();
}
@@ -398,7 +398,7 @@ void ClientSideDetectionHost::MaybeShowPhishingWarning(GURL phishing_url,
<< " is_phishing:" << is_phishing;
if (is_phishing) {
DCHECK(web_contents());
- if (sb_service_) {
+ if (sb_service_.get()) {
SafeBrowsingService::UnsafeResource resource;
resource.url = phishing_url;
resource.original_url = phishing_url;
@@ -470,11 +470,11 @@ void ClientSideDetectionHost::set_client_side_detection_service(
void ClientSideDetectionHost::set_safe_browsing_service(
SafeBrowsingService* service) {
- if (sb_service_) {
+ if (sb_service_.get()) {
sb_service_->RemoveObserver(this);
}
sb_service_ = service;
- if (sb_service_) {
+ if (sb_service_.get()) {
sb_service_->AddObserver(this);
}
}
« no previous file with comments | « chrome/browser/safe_browsing/browser_feature_extractor.cc ('k') | chrome/browser/safe_browsing/safe_browsing_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698