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

Unified Diff: ppapi/proxy/pdf_resource.cc

Issue 2299943002: Record the PDF and top level URL when the PDF plugin crashes. (Closed)
Patch Set: fix typo 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 | « ppapi/proxy/pdf_resource.h ('k') | ppapi/thunk/ppb_pdf_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/pdf_resource.cc
diff --git a/ppapi/proxy/pdf_resource.cc b/ppapi/proxy/pdf_resource.cc
index 2fdf9e46bcc2906dec4fa37cba70a7753dd3cefa..565c23ddf86542cff7733d20cb43ecae3574d442 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* top_level_url) {
+ if (pdf_url)
+ base::debug::SetCrashKeyValue("subresource_url", pdf_url);
+ if (top_level_url)
+ PluginGlobals::Get()->SetActiveURL(top_level_url);
+}
+
} // namespace proxy
} // namespace ppapi
« no previous file with comments | « ppapi/proxy/pdf_resource.h ('k') | ppapi/thunk/ppb_pdf_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698