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

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

Issue 2845035: First change to add safebrowsing service test. ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 }; 173 };
174 174
175 // Clients that we've queued up for checking later once the database is ready. 175 // Clients that we've queued up for checking later once the database is ready.
176 struct QueuedCheck { 176 struct QueuedCheck {
177 Client* client; 177 Client* client;
178 GURL url; 178 GURL url;
179 base::Time start; 179 base::Time start;
180 }; 180 };
181 181
182 friend class base::RefCountedThreadSafe<SafeBrowsingService>; 182 friend class base::RefCountedThreadSafe<SafeBrowsingService>;
183 friend class SafeBrowsingServiceTest;
183 184
184 ~SafeBrowsingService(); 185 ~SafeBrowsingService();
185 186
186 // Called to initialize objects that are used on the io_thread. 187 // Called to initialize objects that are used on the io_thread.
187 void OnIOInitialize(const std::string& client_key, 188 void OnIOInitialize(const std::string& client_key,
188 const std::string& wrapped_key, 189 const std::string& wrapped_key,
189 URLRequestContextGetter* request_context_getter); 190 URLRequestContextGetter* request_context_getter);
190 191
191 // Called to shutdown operations on the io_thread. 192 // Called to shutdown operations on the io_thread.
192 void OnIOShutdown(); 193 void OnIOShutdown();
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // Indicates if we're in the midst of trying to close the database. If this 303 // Indicates if we're in the midst of trying to close the database. If this
303 // is true, nothing on the IO thread should access the database. 304 // is true, nothing on the IO thread should access the database.
304 bool closing_database_; 305 bool closing_database_;
305 306
306 std::deque<QueuedCheck> queued_checks_; 307 std::deque<QueuedCheck> queued_checks_;
307 308
308 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService); 309 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService);
309 }; 310 };
310 311
311 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ 312 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_browsertest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698