Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/incident.cc

Issue 856543004: Replace incident type handlers with implementations of Incident. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: robertshield comments Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698