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

Unified Diff: ppapi/proxy/pdf_resource.cc

Issue 2299943002: Record the PDF and top level URL when the PDF plugin crashes. (Closed)
Patch Set: 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
Index: ppapi/proxy/pdf_resource.cc
diff --git a/ppapi/proxy/pdf_resource.cc b/ppapi/proxy/pdf_resource.cc
index 2fdf9e46bcc2906dec4fa37cba70a7753dd3cefa..d922d62dec05a5174fb09f03abe72b8406ac9334 100644
--- a/ppapi/proxy/pdf_resource.cc
+++ b/ppapi/proxy/pdf_resource.cc
@@ -10,11 +10,13 @@
#include <string.h>
#include "base/command_line.h"
+#include "base/debug/crash_logging.h"
#include "base/metrics/histogram.h"
#include "base/strings/utf_string_conversions.h"
#include "gin/v8_initializer.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/private/ppb_pdf.h"
+#include "ppapi/proxy/plugin_globals.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/shared_impl/var.h"
#include "third_party/icu/source/i18n/unicode/usearch.h"
@@ -190,5 +192,12 @@ void PDFResource::SetAccessibilityPageInfo(
*page_info, text_run_vector, char_vector));
}
+void PDFResource::SetCrashData(const char* pdf_url, const char* embedder_url) {
+ if (pdf_url)
+ base::debug::SetCrashKeyValue("subresource_url", pdf_url);
+ if (embedder_url)
+ PluginGlobals::Get()->SetActiveURL(embedder_url);
+}
+
} // namespace proxy
} // namespace ppapi

Powered by Google App Engine
This is Rietveld 408576698