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

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

Issue 6142009: Upating the app, ceee, chrome, ipc, media, and net directories to use the correct lock.h file. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Unified patch updating all references to the new base/synchronization/lock.h Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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
11 11
12 #include <deque> 12 #include <deque>
13 #include <set> 13 #include <set>
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/hash_tables.h" 17 #include "base/hash_tables.h"
18 #include "base/lock.h"
19 #include "base/ref_counted.h" 18 #include "base/ref_counted.h"
20 #include "base/scoped_ptr.h" 19 #include "base/scoped_ptr.h"
20 #include "base/synchronization/lock.h"
21 #include "base/time.h" 21 #include "base/time.h"
22 #include "chrome/browser/safe_browsing/safe_browsing_util.h" 22 #include "chrome/browser/safe_browsing/safe_browsing_util.h"
23 #include "googleurl/src/gurl.h" 23 #include "googleurl/src/gurl.h"
24 #include "webkit/glue/resource_type.h" 24 #include "webkit/glue/resource_type.h"
25 25
26 class MalwareDetails; 26 class MalwareDetails;
27 class PrefService; 27 class PrefService;
28 class SafeBrowsingDatabase; 28 class SafeBrowsingDatabase;
29 class SafeBrowsingProtocolManager; 29 class SafeBrowsingProtocolManager;
30 class SafeBrowsingServiceFactory; 30 class SafeBrowsingServiceFactory;
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 CurrentChecks checks_; 338 CurrentChecks checks_;
339 339
340 // Used for issuing only one GetHash request for a given prefix. 340 // Used for issuing only one GetHash request for a given prefix.
341 GetHashRequests gethash_requests_; 341 GetHashRequests gethash_requests_;
342 342
343 // The sqlite database. We don't use a scoped_ptr because it needs to be 343 // The sqlite database. We don't use a scoped_ptr because it needs to be
344 // destructed on a different thread than this object. 344 // destructed on a different thread than this object.
345 SafeBrowsingDatabase* database_; 345 SafeBrowsingDatabase* database_;
346 346
347 // Lock used to prevent possible data races due to compiler optimizations. 347 // Lock used to prevent possible data races due to compiler optimizations.
348 mutable Lock database_lock_; 348 mutable base::Lock database_lock_;
349 349
350 // Handles interaction with SafeBrowsing servers. 350 // Handles interaction with SafeBrowsing servers.
351 SafeBrowsingProtocolManager* protocol_manager_; 351 SafeBrowsingProtocolManager* protocol_manager_;
352 352
353 std::vector<WhiteListedEntry> white_listed_entries_; 353 std::vector<WhiteListedEntry> white_listed_entries_;
354 354
355 // Whether the service is running. 'enabled_' is used by SafeBrowsingService 355 // Whether the service is running. 'enabled_' is used by SafeBrowsingService
356 // on the IO thread during normal operations. 356 // on the IO thread during normal operations.
357 bool enabled_; 357 bool enabled_;
358 358
(...skipping 28 matching lines...) Expand all
387 class SafeBrowsingServiceFactory { 387 class SafeBrowsingServiceFactory {
388 public: 388 public:
389 SafeBrowsingServiceFactory() { } 389 SafeBrowsingServiceFactory() { }
390 virtual ~SafeBrowsingServiceFactory() { } 390 virtual ~SafeBrowsingServiceFactory() { }
391 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; 391 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0;
392 private: 392 private:
393 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); 393 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory);
394 }; 394 };
395 395
396 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ 396 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_database.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