OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/safe_browsing/incident_reporting/incident_reporting_ser
vice.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/incident_reporting_ser
vice.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 386 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
387 CancelIncidentCollection(); | 387 CancelIncidentCollection(); |
388 | 388 |
389 // Cancel all internal asynchronous tasks. | 389 // Cancel all internal asynchronous tasks. |
390 weak_ptr_factory_.InvalidateWeakPtrs(); | 390 weak_ptr_factory_.InvalidateWeakPtrs(); |
391 | 391 |
392 CancelEnvironmentCollection(); | 392 CancelEnvironmentCollection(); |
393 CancelDownloadCollection(); | 393 CancelDownloadCollection(); |
394 CancelAllReportUploads(); | 394 CancelAllReportUploads(); |
395 | 395 |
396 STLDeleteValues(&profiles_); | 396 base::STLDeleteValues(&profiles_); |
397 } | 397 } |
398 | 398 |
399 std::unique_ptr<IncidentReceiver> | 399 std::unique_ptr<IncidentReceiver> |
400 IncidentReportingService::GetIncidentReceiver() { | 400 IncidentReportingService::GetIncidentReceiver() { |
401 return base::WrapUnique( | 401 return base::WrapUnique( |
402 new Receiver(receiver_weak_ptr_factory_.GetWeakPtr())); | 402 new Receiver(receiver_weak_ptr_factory_.GetWeakPtr())); |
403 } | 403 } |
404 | 404 |
405 std::unique_ptr<TrackedPreferenceValidationDelegate> | 405 std::unique_ptr<TrackedPreferenceValidationDelegate> |
406 IncidentReportingService::CreatePreferenceValidationDelegate(Profile* profile) { | 406 IncidentReportingService::CreatePreferenceValidationDelegate(Profile* profile) { |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1142 if (!profile->IsOffTheRecord()) | 1142 if (!profile->IsOffTheRecord()) |
1143 OnProfileDestroyed(profile); | 1143 OnProfileDestroyed(profile); |
1144 break; | 1144 break; |
1145 } | 1145 } |
1146 default: | 1146 default: |
1147 break; | 1147 break; |
1148 } | 1148 } |
1149 } | 1149 } |
1150 | 1150 |
1151 } // namespace safe_browsing | 1151 } // namespace safe_browsing |
OLD | NEW |