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

Unified Diff: components/reporting/core/browser/reporting_report.cc

Issue 2249213002: [OBSOLETE] Reporting: Initial implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ProfileImplIOData Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/reporting/core/browser/reporting_report.cc
diff --git a/components/reporting/core/browser/reporting_report.cc b/components/reporting/core/browser/reporting_report.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9239617d2bdf6c3d6692c2e7cae52815f9962508
--- /dev/null
+++ b/components/reporting/core/browser/reporting_report.cc
@@ -0,0 +1,22 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/reporting/core/browser/reporting_report.h"
+
+#include "base/strings/string_number_conversions.h"
+
+namespace reporting {
+
+ReportingReport::ReportingReport() {}
+ReportingReport::~ReportingReport() {}
+
+std::string ReportingReport::ToString() const {
+ base::TimeDelta age = base::TimeTicks::Now() - timestamp;
+ return "(type=" + type + ", group=" + group + ", origin=" + origin.spec() +
+ ", url=" + url.spec() + ", age=" +
+ base::Int64ToString(age.InSeconds()) + "s" + ", attempts=" +
+ base::IntToString(attempts) + ")";
+}
+
+} // namespace reporting

Powered by Google App Engine
This is Rietveld 408576698