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 ac57ed847cee312179e784e8db277629bc81057b..81cb917b089695f5c4b9971c1c843e58b8382f9b 100644 |
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc |
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc |
@@ -80,7 +80,7 @@ class ClientSideDetectionHost::ShouldClassifyUrlRequest |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
DCHECK(web_contents_); |
DCHECK(csd_service_); |
- DCHECK(database_manager_); |
+ DCHECK(database_manager_.get()); |
DCHECK(host_); |
} |
@@ -166,7 +166,7 @@ class ClientSideDetectionHost::ShouldClassifyUrlRequest |
void CheckCsdWhitelist(const GURL& url) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
- if (!database_manager_ || |
+ if (!database_manager_.get() || |
database_manager_->MatchCsdWhitelistUrl(url)) { |
// We're done. There is no point in going back to the UI thread. |
VLOG(1) << "Skipping phishing classification for URL: " << url |
@@ -261,7 +261,7 @@ ClientSideDetectionHost::ClientSideDetectionHost(WebContents* tab) |
scoped_refptr<SafeBrowsingService> sb_service = |
g_browser_process->safe_browsing_service(); |
- if (sb_service) { |
+ if (sb_service.get()) { |
ui_manager_ = sb_service->ui_manager(); |
database_manager_ = sb_service->database_manager(); |
ui_manager_->AddObserver(this); |
@@ -276,7 +276,7 @@ ClientSideDetectionHost::ClientSideDetectionHost(WebContents* tab) |
} |
ClientSideDetectionHost::~ClientSideDetectionHost() { |
- if (ui_manager_) |
+ if (ui_manager_.get()) |
ui_manager_->RemoveObserver(this); |
} |
@@ -329,11 +329,8 @@ void ClientSideDetectionHost::DidNavigateMainFrame( |
browse_info_->http_status_code = details.http_status_code; |
// Notify the renderer if it should classify this URL. |
- classification_request_ = new ShouldClassifyUrlRequest(params, |
- web_contents(), |
- csd_service_, |
- database_manager_, |
- this); |
+ classification_request_ = new ShouldClassifyUrlRequest( |
+ params, web_contents(), csd_service_, database_manager_.get(), this); |
classification_request_->Start(); |
} |
@@ -428,7 +425,7 @@ void ClientSideDetectionHost::MaybeShowPhishingWarning(GURL phishing_url, |
<< " is_phishing:" << is_phishing; |
if (is_phishing) { |
DCHECK(web_contents()); |
- if (ui_manager_) { |
+ if (ui_manager_.get()) { |
SafeBrowsingUIManager::UnsafeResource resource; |
resource.url = phishing_url; |
resource.original_url = phishing_url; |
@@ -538,7 +535,7 @@ void ClientSideDetectionHost::set_client_side_detection_service( |
void ClientSideDetectionHost::set_safe_browsing_managers( |
SafeBrowsingUIManager* ui_manager, |
SafeBrowsingDatabaseManager* database_manager) { |
- if (ui_manager_) |
+ if (ui_manager_.get()) |
ui_manager_->RemoveObserver(this); |
ui_manager_ = ui_manager; |