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

Side by Side Diff: android_webview/browser/aw_content_browser_client.cc

Issue 1525023003: Distinguish in the browser between renderer crashes and kills (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finalized, RFC Created 5 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "android_webview/browser/aw_content_browser_client.h" 5 #include "android_webview/browser/aw_content_browser_client.h"
6 6
7 #include "android_webview/browser/aw_browser_context.h" 7 #include "android_webview/browser/aw_browser_context.h"
8 #include "android_webview/browser/aw_browser_main_parts.h" 8 #include "android_webview/browser/aw_browser_main_parts.h"
9 #include "android_webview/browser/aw_contents_client_bridge_base.h" 9 #include "android_webview/browser/aw_contents_client_bridge_base.h"
10 #include "android_webview/browser/aw_contents_io_thread_client.h" 10 #include "android_webview/browser/aw_contents_io_thread_client.h"
11 #include "android_webview/browser/aw_cookie_access_policy.h" 11 #include "android_webview/browser/aw_cookie_access_policy.h"
12 #include "android_webview/browser/aw_locale_manager.h" 12 #include "android_webview/browser/aw_locale_manager.h"
13 #include "android_webview/browser/aw_printing_message_filter.h" 13 #include "android_webview/browser/aw_printing_message_filter.h"
14 #include "android_webview/browser/aw_quota_permission_context.h" 14 #include "android_webview/browser/aw_quota_permission_context.h"
15 #include "android_webview/browser/aw_web_preferences_populater.h" 15 #include "android_webview/browser/aw_web_preferences_populater.h"
16 #include "android_webview/browser/jni_dependency_factory.h" 16 #include "android_webview/browser/jni_dependency_factory.h"
17 #include "android_webview/browser/net/aw_url_request_context_getter.h" 17 #include "android_webview/browser/net/aw_url_request_context_getter.h"
18 #include "android_webview/browser/net_disk_cache_remover.h" 18 #include "android_webview/browser/net_disk_cache_remover.h"
19 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele gate.h" 19 #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_dele gate.h"
20 #include "android_webview/common/aw_descriptors.h" 20 #include "android_webview/common/aw_descriptors.h"
21 #include "android_webview/common/aw_switches.h" 21 #include "android_webview/common/aw_switches.h"
22 #include "android_webview/common/render_view_messages.h" 22 #include "android_webview/common/render_view_messages.h"
23 #include "android_webview/common/url_constants.h" 23 #include "android_webview/common/url_constants.h"
24 #include "base/android/locale_utils.h" 24 #include "base/android/locale_utils.h"
25 #include "base/base_paths_android.h" 25 #include "base/base_paths_android.h"
26 #include "base/command_line.h" 26 #include "base/command_line.h"
27 #include "base/files/scoped_file.h"
27 #include "base/path_service.h" 28 #include "base/path_service.h"
28 #include "components/cdm/browser/cdm_message_filter_android.h" 29 #include "components/cdm/browser/cdm_message_filter_android.h"
30 #include "components/crash/content/browser/crash_micro_dump_manager_android.h"
29 #include "components/navigation_interception/intercept_navigation_delegate.h" 31 #include "components/navigation_interception/intercept_navigation_delegate.h"
30 #include "content/public/browser/access_token_store.h" 32 #include "content/public/browser/access_token_store.h"
31 #include "content/public/browser/browser_message_filter.h" 33 #include "content/public/browser/browser_message_filter.h"
32 #include "content/public/browser/child_process_security_policy.h" 34 #include "content/public/browser/child_process_security_policy.h"
33 #include "content/public/browser/client_certificate_delegate.h" 35 #include "content/public/browser/client_certificate_delegate.h"
34 #include "content/public/browser/navigation_handle.h" 36 #include "content/public/browser/navigation_handle.h"
35 #include "content/public/browser/navigation_throttle.h" 37 #include "content/public/browser/navigation_throttle.h"
36 #include "content/public/browser/render_frame_host.h" 38 #include "content/public/browser/render_frame_host.h"
37 #include "content/public/browser/render_process_host.h" 39 #include "content/public/browser/render_process_host.h"
38 #include "content/public/browser/render_view_host.h" 40 #include "content/public/browser/render_view_host.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 const base::CommandLine& command_line, 480 const base::CommandLine& command_line,
479 int child_process_id, 481 int child_process_id,
480 content::FileDescriptorInfo* mappings, 482 content::FileDescriptorInfo* mappings,
481 std::map<int, base::MemoryMappedFile::Region>* regions) { 483 std::map<int, base::MemoryMappedFile::Region>* regions) {
482 int fd = ui::GetMainAndroidPackFd( 484 int fd = ui::GetMainAndroidPackFd(
483 &(*regions)[kAndroidWebViewMainPakDescriptor]); 485 &(*regions)[kAndroidWebViewMainPakDescriptor]);
484 mappings->Share(kAndroidWebViewMainPakDescriptor, fd); 486 mappings->Share(kAndroidWebViewMainPakDescriptor, fd);
485 487
486 fd = ui::GetLocalePackFd(&(*regions)[kAndroidWebViewLocalePakDescriptor]); 488 fd = ui::GetLocalePackFd(&(*regions)[kAndroidWebViewLocalePakDescriptor]);
487 mappings->Share(kAndroidWebViewLocalePakDescriptor, fd); 489 mappings->Share(kAndroidWebViewLocalePakDescriptor, fd);
490
491 base::File crash_signal_file =
492 breakpad::CrashMicroDumpManager::GetInstance()->CreateCrashInfoChannel(
493 child_process_id);
494 if (crash_signal_file.IsValid()) {
Torne 2015/12/16 14:48:35 Is this ever expected to not be valid?
mnaganov (inactive) 2015/12/16 19:10:12 If socket pair creation fails, I suppose.
495 mappings->Transfer(kAndroidWebViewCrashSignalDescriptor,
496 base::ScopedFD(crash_signal_file.TakePlatformFile()));
497 }
488 } 498 }
489 499
490 void AwContentBrowserClient::OverrideWebkitPrefs( 500 void AwContentBrowserClient::OverrideWebkitPrefs(
491 content::RenderViewHost* rvh, 501 content::RenderViewHost* rvh,
492 content::WebPreferences* web_prefs) { 502 content::WebPreferences* web_prefs) {
493 if (!preferences_populater_.get()) { 503 if (!preferences_populater_.get()) {
494 preferences_populater_ = make_scoped_ptr(native_factory_-> 504 preferences_populater_ = make_scoped_ptr(native_factory_->
495 CreateWebPreferencesPopulater()); 505 CreateWebPreferencesPopulater());
496 } 506 }
497 preferences_populater_->PopulateFor( 507 preferences_populater_->PopulateFor(
(...skipping 18 matching lines...) Expand all
516 526
517 #if defined(VIDEO_HOLE) 527 #if defined(VIDEO_HOLE)
518 content::ExternalVideoSurfaceContainer* 528 content::ExternalVideoSurfaceContainer*
519 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer( 529 AwContentBrowserClient::OverrideCreateExternalVideoSurfaceContainer(
520 content::WebContents* web_contents) { 530 content::WebContents* web_contents) {
521 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents); 531 return native_factory_->CreateExternalVideoSurfaceContainer(web_contents);
522 } 532 }
523 #endif 533 #endif
524 534
525 } // namespace android_webview 535 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698