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

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

Issue 7134017: Make safe browsing work in a multi-profile environment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: respond to mattm's comment Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 10 #pragma once
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 // Called on the UI thread to initialize the service. 138 // Called on the UI thread to initialize the service.
139 void Initialize(); 139 void Initialize();
140 140
141 // Called on the main thread to let us know that the io_thread is going away. 141 // Called on the main thread to let us know that the io_thread is going away.
142 void ShutDown(); 142 void ShutDown();
143 143
144 // Returns true if the url's scheme can be checked. 144 // Returns true if the url's scheme can be checked.
145 bool CanCheckUrl(const GURL& url) const; 145 bool CanCheckUrl(const GURL& url) const;
146 146
147 // Called on UI thread to decide if safe browsing related stats 147 // Called on UI thread to decide if safe browsing related stats should be
148 // could be reported. 148 // reported.
149 bool CanReportStats() const; 149 bool CanReportStats() const;
150 150
151 // Called on UI thread to decide if the download file's sha256 hash 151 // Called on UI thread to decide if the download file's sha256 hash should be
152 // should be calculated for safebrowsing. 152 // calculated for safebrowsing.
153 bool DownloadBinHashNeeded() const; 153 bool DownloadBinHashNeeded() const;
154 154
155 // Called on the IO thread to check if the given url is safe or not. If we 155 // Called on the IO thread to check if the given url is safe or not. If we
156 // can synchronously determine that the url is safe, CheckUrl returns true. 156 // can synchronously determine that the url is safe, CheckUrl returns true.
157 // Otherwise it returns false, and "client" is called asynchronously with the 157 // Otherwise it returns false, and "client" is called asynchronously with the
158 // result when it is ready. 158 // result when it is ready.
159 virtual bool CheckBrowseUrl(const GURL& url, Client* client); 159 virtual bool CheckBrowseUrl(const GURL& url, Client* client);
160 160
161 // Check if the prefix for |url| is in safebrowsing download add lists. 161 // Check if the prefix for |url| is in safebrowsing download add lists.
162 // Result will be passed to callback in |client|. 162 // Result will be passed to callback in |client|.
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 class SafeBrowsingServiceFactory { 479 class SafeBrowsingServiceFactory {
480 public: 480 public:
481 SafeBrowsingServiceFactory() { } 481 SafeBrowsingServiceFactory() { }
482 virtual ~SafeBrowsingServiceFactory() { } 482 virtual ~SafeBrowsingServiceFactory() { }
483 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; 483 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0;
484 private: 484 private:
485 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); 485 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory);
486 }; 486 };
487 487
488 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ 488 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698