Index: chrome/browser/browser_process_impl.cc |
=================================================================== |
--- chrome/browser/browser_process_impl.cc (revision 91583) |
+++ chrome/browser/browser_process_impl.cc (working copy) |
@@ -962,6 +962,8 @@ |
void BrowserProcessImpl::CreateSafeBrowsingService() { |
DCHECK(safe_browsing_service_.get() == NULL); |
+ // Set this flag to true so that we don't retry indefinitely to |
+ // create the service class if there was an error. |
created_safe_browsing_service_ = true; |
safe_browsing_service_ = SafeBrowsingService::CreateSafeBrowsingService(); |
safe_browsing_service_->Initialize(); |
@@ -974,14 +976,11 @@ |
created_safe_browsing_detection_service_ = true; |
FilePath model_file_dir; |
- Profile* profile = profile_manager() ? |
- profile_manager()->GetDefaultProfile() : NULL; |
if (IsSafeBrowsingDetectionServiceEnabled() && |
- PathService::Get(chrome::DIR_USER_DATA, &model_file_dir) && |
- profile && profile->GetRequestContext()) { |
+ PathService::Get(chrome::DIR_USER_DATA, &model_file_dir)) { |
safe_browsing_detection_service_.reset( |
safe_browsing::ClientSideDetectionService::Create( |
- model_file_dir, profile->GetRequestContext())); |
+ model_file_dir, g_browser_process->system_request_context())); |
} |
} |