| Index: chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
|
| diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
|
| index 955e8d4b5047c05454f3201fcaacd45ab18b4ae4..30e5beb801cd139b7fad3f114dcead603725e136 100644
|
| --- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
|
| +++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
|
| @@ -438,6 +438,10 @@ scoped_ptr<IncidentReportUploader> IncidentReportingService::StartReportUpload(
|
| callback, request_context_getter, report).Pass();
|
| }
|
|
|
| +bool IncidentReportingService::IsProcessingReport() const {
|
| + return report_ != NULL;
|
| +}
|
| +
|
| IncidentReportingService::ProfileContext*
|
| IncidentReportingService::GetOrCreateProfileContext(Profile* profile) {
|
| ProfileContextCollection::iterator it =
|
| @@ -680,11 +684,11 @@ bool IncidentReportingService::WaitingForMostRecentDownload() {
|
| // The next easy case: waiting if the finder is operating.
|
| if (last_download_finder_)
|
| return true;
|
| - // The harder case: waiting if a profile has not yet been added.
|
| + // The harder case: waiting if a non-NULL profile has not yet been added.
|
| for (ProfileContextCollection::const_iterator scan = profiles_.begin();
|
| scan != profiles_.end();
|
| ++scan) {
|
| - if (!scan->second->added)
|
| + if (scan->first && !scan->second->added)
|
| return true;
|
| }
|
| // There is no most recent download and there's nothing more to wait for.
|
|
|