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

Unified Diff: chrome/browser/feedback/system_logs/log_sources/crash_ids_source.h

Issue 2242833003: Add the most recent crash report IDs to feedback reports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert back to a const rather than a constexpr Created 4 years, 3 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
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/feedback/system_logs/log_sources/crash_ids_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/feedback/system_logs/log_sources/crash_ids_source.h
diff --git a/chrome/browser/feedback/system_logs/log_sources/crash_ids_source.h b/chrome/browser/feedback/system_logs/log_sources/crash_ids_source.h
new file mode 100644
index 0000000000000000000000000000000000000000..c648ce9721198ecb894f87a4c37b4ef5c08a7930
--- /dev/null
+++ b/chrome/browser/feedback/system_logs/log_sources/crash_ids_source.h
@@ -0,0 +1,49 @@
+// 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.
+
+#ifndef CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_LOG_SOURCES_CRASH_IDS_SOURCE_H_
+#define CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_LOG_SOURCES_CRASH_IDS_SOURCE_H_
+
+#include <vector>
+
+#include "base/callback_forward.h"
+#include "chrome/browser/feedback/system_logs/system_logs_fetcher_base.h"
+#include "components/upload_list/crash_upload_list.h"
+#include "components/upload_list/upload_list.h"
+
+namespace system_logs {
+
+// Extract the most recent crash IDs (if any) and adds them to the system logs.
+class CrashIdsSource : public SystemLogsSource, public UploadList::Delegate {
+ public:
+ CrashIdsSource();
+ ~CrashIdsSource() override;
+
+ // SystemLogsSource:
+ void Fetch(const SysLogsSourceCallback& callback) override;
+
+ // UploadList::Delegate:
+ void OnUploadListAvailable() override;
+
+ private:
+ void RespondWithCrashIds(const SysLogsSourceCallback& callback) const;
+
+ scoped_refptr<CrashUploadList> crash_upload_list_;
+
+ // A comma-separated list of crash IDs as expected by the server.
+ std::string crash_ids_list_;
+
+ // Contains any pending fetch requests waiting for the crash upload list to
+ // finish loading.
+ std::vector<base::Closure> pending_requests_;
+
+ // True if the crash list is currently being loaded.
+ bool pending_crash_list_loading_;
+
+ DISALLOW_COPY_AND_ASSIGN(CrashIdsSource);
+};
+
+} // namespace system_logs
+
+#endif // CHROME_BROWSER_FEEDBACK_SYSTEM_LOGS_LOG_SOURCES_CRASH_IDS_SOURCE_H_
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/feedback/system_logs/log_sources/crash_ids_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698