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

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

Issue 1343293004: Don't check URLs against Safe Browsing if not supported. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: braces, per the thestig Created 5 years, 3 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_DATABASE_MANAGER_H_ 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_
9 #define CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ 9 #define CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_
10 10
(...skipping 25 matching lines...) Expand all
36 36
37 // Called when the result of checking a download URL is known. 37 // Called when the result of checking a download URL is known.
38 virtual void OnCheckDownloadUrlResult(const std::vector<GURL>& url_chain, 38 virtual void OnCheckDownloadUrlResult(const std::vector<GURL>& url_chain,
39 SBThreatType threat_type) {} 39 SBThreatType threat_type) {}
40 40
41 // Called when the result of checking a set of extensions is known. 41 // Called when the result of checking a set of extensions is known.
42 virtual void OnCheckExtensionsResult( 42 virtual void OnCheckExtensionsResult(
43 const std::set<std::string>& threats) {} 43 const std::set<std::string>& threats) {}
44 }; 44 };
45 45
46 // Returns true if URL-checking is supported on this build+device.
47 // If false, calls to CheckBrowseUrl may dcheck-fail.
48 virtual bool IsSupported() const = 0;
49
46 // Returns true if the url's scheme can be checked. 50 // Returns true if the url's scheme can be checked.
47 virtual bool CanCheckUrl(const GURL& url) const = 0; 51 virtual bool CanCheckUrl(const GURL& url) const = 0;
48 52
49 // Returns whether download protection is enabled. 53 // Returns whether download protection is enabled.
50 virtual bool download_protection_enabled() const = 0; 54 virtual bool download_protection_enabled() const = 0;
51 55
52 // Called on the IO thread to check if the given url is safe or not. If we 56 // Called on the IO thread to check if the given url is safe or not. If we
53 // can synchronously determine that the url is safe, CheckUrl returns true. 57 // can synchronously determine that the url is safe, CheckUrl returns true.
54 // Otherwise it returns false, and "client" is called asynchronously with the 58 // Otherwise it returns false, and "client" is called asynchronously with the
55 // result when it is ready. 59 // result when it is ready.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // on IO thread. If shutdown is true, the manager is disabled permanently. 118 // on IO thread. If shutdown is true, the manager is disabled permanently.
115 virtual void StopOnIOThread(bool shutdown) = 0; 119 virtual void StopOnIOThread(bool shutdown) = 0;
116 120
117 protected: 121 protected:
118 virtual ~SafeBrowsingDatabaseManager() {} 122 virtual ~SafeBrowsingDatabaseManager() {}
119 123
120 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>; 124 friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>;
121 }; // class SafeBrowsingDatabaseManager 125 }; // class SafeBrowsingDatabaseManager
122 126
123 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_ 127 #endif // CHROME_BROWSER_SAFE_BROWSING_DATABASE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/safe_browsing_resource_throttle.cc ('k') | chrome/browser/safe_browsing/local_database_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698