| OLD | NEW |
| (Empty) | |
| 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. |
| 4 |
| 5 #include "chrome/browser/safe_browsing/incident_reporting/incident.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "base/time/time.h" |
| 9 #include "chrome/common/safe_browsing/csd.pb.h" |
| 10 |
| 11 namespace safe_browsing { |
| 12 |
| 13 Incident::~Incident() { |
| 14 } |
| 15 |
| 16 scoped_ptr<ClientIncidentReport_IncidentData> Incident::TakePayload() { |
| 17 return payload_.Pass(); |
| 18 } |
| 19 |
| 20 Incident::Incident() : payload_(new ClientIncidentReport_IncidentData) { |
| 21 payload_->set_incident_time_msec(base::Time::Now().ToJavaTime()); |
| 22 } |
| 23 |
| 24 ClientIncidentReport_IncidentData* Incident::payload() { |
| 25 DCHECK(payload_); |
| 26 return payload_.get(); |
| 27 } |
| 28 |
| 29 const ClientIncidentReport_IncidentData* Incident::payload() const { |
| 30 DCHECK(payload_); |
| 31 return payload_.get(); |
| 32 } |
| 33 |
| 34 } // namespace safe_browsing |
| OLD | NEW |