| 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 | 391 |
| 392 CancelEnvironmentCollection(); | 392 CancelEnvironmentCollection(); |
| 393 CancelDownloadCollection(); | 393 CancelDownloadCollection(); |
| 394 CancelAllReportUploads(); | 394 CancelAllReportUploads(); |
| 395 | 395 |
| 396 base::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::MakeUnique<Receiver>(receiver_weak_ptr_factory_.GetWeakPtr()); |
| 402 new Receiver(receiver_weak_ptr_factory_.GetWeakPtr())); | |
| 403 } | 402 } |
| 404 | 403 |
| 405 std::unique_ptr<TrackedPreferenceValidationDelegate> | 404 std::unique_ptr<TrackedPreferenceValidationDelegate> |
| 406 IncidentReportingService::CreatePreferenceValidationDelegate(Profile* profile) { | 405 IncidentReportingService::CreatePreferenceValidationDelegate(Profile* profile) { |
| 407 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 406 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 408 | 407 |
| 409 if (profile->IsOffTheRecord()) | 408 if (profile->IsOffTheRecord()) |
| 410 return std::unique_ptr<TrackedPreferenceValidationDelegate>(); | 409 return std::unique_ptr<TrackedPreferenceValidationDelegate>(); |
| 411 return std::unique_ptr<TrackedPreferenceValidationDelegate>( | 410 return std::unique_ptr<TrackedPreferenceValidationDelegate>( |
| 412 new PreferenceValidationDelegate(profile, GetIncidentReceiver())); | 411 new PreferenceValidationDelegate(profile, GetIncidentReceiver())); |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 if (!profile->IsOffTheRecord()) | 1141 if (!profile->IsOffTheRecord()) |
| 1143 OnProfileDestroyed(profile); | 1142 OnProfileDestroyed(profile); |
| 1144 break; | 1143 break; |
| 1145 } | 1144 } |
| 1146 default: | 1145 default: |
| 1147 break; | 1146 break; |
| 1148 } | 1147 } |
| 1149 } | 1148 } |
| 1150 | 1149 |
| 1151 } // namespace safe_browsing | 1150 } // namespace safe_browsing |
| OLD | NEW |