Chromium Code Reviews| Index: chrome/browser/safe_browsing/safe_browsing_service.h |
| diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h |
| index aacf4aff54ec37aa3912c3ce48b117a3f7a8a2f4..2a15a97cc4dc109613ec48c267679e58a6eaf0f4 100644 |
| --- a/chrome/browser/safe_browsing/safe_browsing_service.h |
| +++ b/chrome/browser/safe_browsing/safe_browsing_service.h |
| @@ -35,12 +35,14 @@ class PrefService; |
| class SafeBrowsingDatabase; |
| class SafeBrowsingProtocolManager; |
| class SafeBrowsingServiceFactory; |
| +class SafeBrowsingURLRequestContextGetter; |
| namespace base { |
| class Thread; |
| } |
| namespace net { |
| +class URLRequestContext; |
| class URLRequestContextGetter; |
| } |
| @@ -341,14 +343,21 @@ class SafeBrowsingService |
| content::BrowserThread::UI>; |
| friend class base::DeleteHelper<SafeBrowsingService>; |
| friend class SafeBrowsingServiceTest; |
| + friend class SafeBrowsingURLRequestContextGetter; |
| - // Called to initialize objects that are used on the io_thread. |
| - void OnIOInitialize(const std::string& client_key, |
| - const std::string& wrapped_key, |
| - net::URLRequestContextGetter* request_context_getter); |
| + void InitURLRequestContextOnIOThread( |
| + net::URLRequestContextGetter* system_url_request_context_getter); |
| - // Called to shutdown operations on the io_thread. |
| - void OnIOShutdown(); |
| + void DestroyURLRequestContextOnIOThread(); |
| + |
| + // Called to initialize objects that are used on the io_thread. This may be |
| + // called multiple times during the life of the SafeBrowsingService. |
| + void StartOnIOThread(const std::string& client_key, |
| + const std::string& wrapped_key); |
|
willchan no longer on Chromium
2012/02/04 22:30:20
indentation off
mattm
2012/02/07 01:28:01
Done.
|
| + |
| + // Called to shutdown operations on the io_thread. This may be called multiple |
| + // times during the life of the SafeBrowsingService. |
| + void StopOnIOThread(); |
| // Returns whether |database_| exists and is accessible. |
| bool DatabaseAvailable() const; |
| @@ -503,6 +512,14 @@ class SafeBrowsingService |
| // Lock used to prevent possible data races due to compiler optimizations. |
| mutable base::Lock database_lock_; |
| + // The SafeBrowsingURLRequestContextGetter used to access |
| + // |url_request_context_|. |
| + scoped_refptr<net::URLRequestContextGetter> |
| + url_request_context_getter_; |
| + |
| + // The SafeBrowsingURLRequestContext. |
| + scoped_refptr<net::URLRequestContext> url_request_context_; |
| + |
| // Handles interaction with SafeBrowsing servers. |
| SafeBrowsingProtocolManager* protocol_manager_; |