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

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service.h

Issue 1060033003: [chrome/browser/safe_browsing] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit test break now Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // The Safe Browsing service is responsible for downloading anti-phishing and 5 // The Safe Browsing service is responsible for downloading anti-phishing and
6 // anti-malware tables and checking urls against them. 6 // anti-malware tables and checking urls against them.
7 7
8 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_
9 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ 9 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_
10 10
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // should be calculated for safebrowsing. 97 // should be calculated for safebrowsing.
98 bool DownloadBinHashNeeded() const; 98 bool DownloadBinHashNeeded() const;
99 99
100 // Create a protocol config struct. 100 // Create a protocol config struct.
101 virtual SafeBrowsingProtocolConfig GetProtocolConfig() const; 101 virtual SafeBrowsingProtocolConfig GetProtocolConfig() const;
102 102
103 bool enabled() const { return enabled_; } 103 bool enabled() const { return enabled_; }
104 104
105 safe_browsing::ClientSideDetectionService* 105 safe_browsing::ClientSideDetectionService*
106 safe_browsing_detection_service() const { 106 safe_browsing_detection_service() const {
107 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 107 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
108 return csd_service_.get(); 108 return csd_service_.get();
109 } 109 }
110 110
111 // The DownloadProtectionService is not valid after the SafeBrowsingService 111 // The DownloadProtectionService is not valid after the SafeBrowsingService
112 // is destroyed. 112 // is destroyed.
113 safe_browsing::DownloadProtectionService* 113 safe_browsing::DownloadProtectionService*
114 download_protection_service() const { 114 download_protection_service() const {
115 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); 115 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
116 return download_service_.get(); 116 return download_service_.get();
117 } 117 }
118 118
119 net::URLRequestContextGetter* url_request_context(); 119 net::URLRequestContextGetter* url_request_context();
120 120
121 const scoped_refptr<SafeBrowsingUIManager>& ui_manager() const; 121 const scoped_refptr<SafeBrowsingUIManager>& ui_manager() const;
122 122
123 const scoped_refptr<SafeBrowsingDatabaseManager>& database_manager() const; 123 const scoped_refptr<SafeBrowsingDatabaseManager>& database_manager() const;
124 124
125 SafeBrowsingProtocolManager* protocol_manager() const; 125 SafeBrowsingProtocolManager* protocol_manager() const;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 class SafeBrowsingServiceFactory { 279 class SafeBrowsingServiceFactory {
280 public: 280 public:
281 SafeBrowsingServiceFactory() { } 281 SafeBrowsingServiceFactory() { }
282 virtual ~SafeBrowsingServiceFactory() { } 282 virtual ~SafeBrowsingServiceFactory() { }
283 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; 283 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0;
284 private: 284 private:
285 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); 285 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory);
286 }; 286 };
287 287
288 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ 288 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/ping_manager.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698