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

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

Issue 2733343002: Move chrome/common/safe_browsing/csd.proto to components/safe_browsing (Closed)
Patch Set: rebase again Created 3 years, 9 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
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/incident.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/incident.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "chrome/common/safe_browsing/csd.pb.h" 11 #include "components/safe_browsing/csd.pb.h"
12 12
13 namespace safe_browsing { 13 namespace safe_browsing {
14 14
15 Incident::~Incident() { 15 Incident::~Incident() {
16 } 16 }
17 17
18 std::unique_ptr<ClientIncidentReport_IncidentData> Incident::TakePayload() { 18 std::unique_ptr<ClientIncidentReport_IncidentData> Incident::TakePayload() {
19 return std::move(payload_); 19 return std::move(payload_);
20 } 20 }
21 21
22 Incident::Incident() : payload_(new ClientIncidentReport_IncidentData) { 22 Incident::Incident() : payload_(new ClientIncidentReport_IncidentData) {
23 payload_->set_incident_time_msec(base::Time::Now().ToJavaTime()); 23 payload_->set_incident_time_msec(base::Time::Now().ToJavaTime());
24 } 24 }
25 25
26 ClientIncidentReport_IncidentData* Incident::payload() { 26 ClientIncidentReport_IncidentData* Incident::payload() {
27 DCHECK(payload_); 27 DCHECK(payload_);
28 return payload_.get(); 28 return payload_.get();
29 } 29 }
30 30
31 const ClientIncidentReport_IncidentData* Incident::payload() const { 31 const ClientIncidentReport_IncidentData* Incident::payload() const {
32 DCHECK(payload_); 32 DCHECK(payload_);
33 return payload_.get(); 33 return payload_.get();
34 } 34 }
35 35
36 } // namespace safe_browsing 36 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698