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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ppapi/proxy/pdf_resource.h" 5 #include "ppapi/proxy/pdf_resource.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/debug/crash_logging.h"
13 #include "base/metrics/histogram.h" 14 #include "base/metrics/histogram.h"
14 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
15 #include "gin/v8_initializer.h" 16 #include "gin/v8_initializer.h"
16 #include "ppapi/c/pp_errors.h" 17 #include "ppapi/c/pp_errors.h"
17 #include "ppapi/c/private/ppb_pdf.h" 18 #include "ppapi/c/private/ppb_pdf.h"
19 #include "ppapi/proxy/plugin_globals.h"
18 #include "ppapi/proxy/ppapi_messages.h" 20 #include "ppapi/proxy/ppapi_messages.h"
19 #include "ppapi/shared_impl/var.h" 21 #include "ppapi/shared_impl/var.h"
20 #include "third_party/icu/source/i18n/unicode/usearch.h" 22 #include "third_party/icu/source/i18n/unicode/usearch.h"
21 23
22 namespace ppapi { 24 namespace ppapi {
23 namespace proxy { 25 namespace proxy {
24 26
25 namespace { 27 namespace {
26 28
27 // TODO(raymes): This is just copied from render_thread_impl.cc. We should have 29 // TODO(raymes): This is just copied from render_thread_impl.cc. We should have
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 PP_PrivateAccessibilityTextRunInfo text_runs[], 185 PP_PrivateAccessibilityTextRunInfo text_runs[],
184 PP_PrivateAccessibilityCharInfo chars[]) { 186 PP_PrivateAccessibilityCharInfo chars[]) {
185 std::vector<PP_PrivateAccessibilityTextRunInfo> text_run_vector( 187 std::vector<PP_PrivateAccessibilityTextRunInfo> text_run_vector(
186 text_runs, text_runs + page_info->text_run_count); 188 text_runs, text_runs + page_info->text_run_count);
187 std::vector<PP_PrivateAccessibilityCharInfo> char_vector( 189 std::vector<PP_PrivateAccessibilityCharInfo> char_vector(
188 chars, chars + page_info->char_count); 190 chars, chars + page_info->char_count);
189 Post(RENDERER, PpapiHostMsg_PDF_SetAccessibilityPageInfo( 191 Post(RENDERER, PpapiHostMsg_PDF_SetAccessibilityPageInfo(
190 *page_info, text_run_vector, char_vector)); 192 *page_info, text_run_vector, char_vector));
191 } 193 }
192 194
195 void PDFResource::SetCrashData(const char* pdf_url, const char* top_level_url) {
196 if (pdf_url)
197 base::debug::SetCrashKeyValue("subresource_url", pdf_url);
198 if (top_level_url)
199 PluginGlobals::Get()->SetActiveURL(top_level_url);
200 }
201
193 } // namespace proxy 202 } // namespace proxy
194 } // namespace ppapi 203 } // namespace ppapi
OLDNEW
« 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