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

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

Issue 10918279: Provide mutable members of UrlRequestContext via pure-virtual interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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 24 matching lines...) Expand all
35 class SafeBrowsingDatabase; 35 class SafeBrowsingDatabase;
36 class SafeBrowsingProtocolManager; 36 class SafeBrowsingProtocolManager;
37 class SafeBrowsingServiceFactory; 37 class SafeBrowsingServiceFactory;
38 class SafeBrowsingURLRequestContextGetter; 38 class SafeBrowsingURLRequestContextGetter;
39 39
40 namespace base { 40 namespace base {
41 class Thread; 41 class Thread;
42 } 42 }
43 43
44 namespace net { 44 namespace net {
45 class HttpUserAgentSettings;
45 class URLRequestContext; 46 class URLRequestContext;
46 class URLRequestContextGetter; 47 class URLRequestContextGetter;
47 } 48 }
48 49
49 namespace safe_browsing { 50 namespace safe_browsing {
50 class ClientSideDetectionService; 51 class ClientSideDetectionService;
51 class DownloadProtectionService; 52 class DownloadProtectionService;
52 } 53 }
53 54
54 // Construction needs to happen on the main thread. 55 // Construction needs to happen on the main thread.
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 SafeBrowsingDatabase* database_; 512 SafeBrowsingDatabase* database_;
512 513
513 // Lock used to prevent possible data races due to compiler optimizations. 514 // Lock used to prevent possible data races due to compiler optimizations.
514 mutable base::Lock database_lock_; 515 mutable base::Lock database_lock_;
515 516
516 // The SafeBrowsingURLRequestContextGetter used to access 517 // The SafeBrowsingURLRequestContextGetter used to access
517 // |url_request_context_|. 518 // |url_request_context_|.
518 scoped_refptr<net::URLRequestContextGetter> 519 scoped_refptr<net::URLRequestContextGetter>
519 url_request_context_getter_; 520 url_request_context_getter_;
520 521
521 // The SafeBrowsingURLRequestContext. 522 // URLRequestContext and HttpUserAgentSettings for SafeBrowsing.
522 scoped_ptr<net::URLRequestContext> url_request_context_; 523 scoped_ptr<net::URLRequestContext> url_request_context_;
524 scoped_ptr<net::HttpUserAgentSettings> http_user_agent_settings_;
523 525
524 // Handles interaction with SafeBrowsing servers. 526 // Handles interaction with SafeBrowsing servers.
525 SafeBrowsingProtocolManager* protocol_manager_; 527 SafeBrowsingProtocolManager* protocol_manager_;
526 528
527 // Only access this whitelist from the UI thread. 529 // Only access this whitelist from the UI thread.
528 std::vector<WhiteListedEntry> white_listed_entries_; 530 std::vector<WhiteListedEntry> white_listed_entries_;
529 531
530 // Whether the service is running. 'enabled_' is used by SafeBrowsingService 532 // Whether the service is running. 'enabled_' is used by SafeBrowsingService
531 // on the IO thread during normal operations. 533 // on the IO thread during normal operations.
532 bool enabled_; 534 bool enabled_;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 class SafeBrowsingServiceFactory { 599 class SafeBrowsingServiceFactory {
598 public: 600 public:
599 SafeBrowsingServiceFactory() { } 601 SafeBrowsingServiceFactory() { }
600 virtual ~SafeBrowsingServiceFactory() { } 602 virtual ~SafeBrowsingServiceFactory() { }
601 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; 603 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0;
602 private: 604 private:
603 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); 605 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory);
604 }; 606 };
605 607
606 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ 608 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698