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
3 // found in the LICENSE file.
5 #include "chrome/browser/safe_browsing/incident_reporting/incident.h"
7 #include "base/logging.h"
8 #include "base/time/time.h"
9 #include "chrome/common/safe_browsing/csd.pb.h"
11 namespace safe_browsing
{
13 Incident::~Incident() {
16 scoped_ptr
<ClientIncidentReport_IncidentData
> Incident::TakePayload() {
17 return payload_
.Pass();
20 Incident::Incident() : payload_(new ClientIncidentReport_IncidentData
) {
21 payload_
->set_incident_time_msec(base::Time::Now().ToJavaTime());
24 ClientIncidentReport_IncidentData
* Incident::payload() {
26 return payload_
.get();
29 const ClientIncidentReport_IncidentData
* Incident::payload() const {
31 return payload_
.get();
34 } // namespace safe_browsing