| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/resource_request_detec
tor.h" | 5 #include "chrome/browser/safe_browsing/incident_reporting/resource_request_detec
tor.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 174 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 175 | 175 |
| 176 Profile* profile = GetProfileForRenderProcessId(render_process_id); | 176 Profile* profile = GetProfileForRenderProcessId(render_process_id); |
| 177 if (profile || allow_null_profile_for_testing_) { | 177 if (profile || allow_null_profile_for_testing_) { |
| 178 // Add the URL obtained from the RenderFrameHost, if available. | 178 // Add the URL obtained from the RenderFrameHost, if available. |
| 179 GURL host_url = GetUrlForRenderFrameId(render_process_id, render_frame_id); | 179 GURL host_url = GetUrlForRenderFrameId(render_process_id, render_frame_id); |
| 180 if (host_url.is_valid()) | 180 if (host_url.is_valid()) |
| 181 incident_data->set_origin(host_url.GetOrigin().spec()); | 181 incident_data->set_origin(host_url.GetOrigin().spec()); |
| 182 | 182 |
| 183 incident_receiver_->AddIncidentForProfile( | 183 incident_receiver_->AddIncidentForProfile( |
| 184 profile, base::WrapUnique( | 184 profile, |
| 185 new ResourceRequestIncident(std::move(incident_data)))); | 185 base::MakeUnique<ResourceRequestIncident>(std::move(incident_data))); |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 | 188 |
| 189 } // namespace safe_browsing | 189 } // namespace safe_browsing |
| OLD | NEW |