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

Side by Side Diff: android_webview/browser/aw_browser_main_parts.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_browser_main_parts.h" 5 #include "android_webview/browser/aw_browser_main_parts.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_dev_tools_discovery_provider.h" 8 #include "android_webview/browser/aw_dev_tools_discovery_provider.h"
9 #include "android_webview/browser/aw_media_client_android.h" 9 #include "android_webview/browser/aw_media_client_android.h"
10 #include "android_webview/browser/aw_result_codes.h" 10 #include "android_webview/browser/aw_result_codes.h"
11 #include "android_webview/browser/deferred_gpu_command_service.h" 11 #include "android_webview/browser/deferred_gpu_command_service.h"
12 #include "android_webview/common/aw_resource.h" 12 #include "android_webview/common/aw_resource.h"
13 #include "android_webview/common/aw_switches.h" 13 #include "android_webview/common/aw_switches.h"
14 #include "base/android/apk_assets.h" 14 #include "base/android/apk_assets.h"
15 #include "base/android/build_info.h" 15 #include "base/android/build_info.h"
16 #include "base/android/locale_utils.h" 16 #include "base/android/locale_utils.h"
17 #include "base/android/memory_pressure_listener_android.h" 17 #include "base/android/memory_pressure_listener_android.h"
18 #include "base/command_line.h" 18 #include "base/command_line.h"
19 #include "base/files/file_path.h" 19 #include "base/files/file_path.h"
20 #include "base/path_service.h" 20 #include "base/path_service.h"
21 #include "components/crash/content/browser/crash_micro_dump_manager_android.h"
21 #include "content/public/browser/android/synchronous_compositor.h" 22 #include "content/public/browser/android/synchronous_compositor.h"
22 #include "content/public/browser/render_frame_host.h" 23 #include "content/public/browser/render_frame_host.h"
23 #include "content/public/browser/render_process_host.h" 24 #include "content/public/browser/render_process_host.h"
24 #include "content/public/common/content_client.h" 25 #include "content/public/common/content_client.h"
25 #include "content/public/common/content_switches.h" 26 #include "content/public/common/content_switches.h"
26 #include "content/public/common/result_codes.h" 27 #include "content/public/common/result_codes.h"
27 #include "content/public/common/url_utils.h" 28 #include "content/public/common/url_utils.h"
28 #include "media/base/android/media_client_android.h" 29 #include "media/base/android/media_client_android.h"
29 #include "net/android/network_change_notifier_factory_android.h" 30 #include "net/android/network_change_notifier_factory_android.h"
30 #include "net/base/network_change_notifier.h" 31 #include "net/base/network_change_notifier.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // Try to directly mmap the webviewchromium.pak from the apk. Fall back to 70 // Try to directly mmap the webviewchromium.pak from the apk. Fall back to
70 // load from file, using PATH_SERVICE, otherwise. 71 // load from file, using PATH_SERVICE, otherwise.
71 base::FilePath pak_file_path; 72 base::FilePath pak_file_path;
72 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &pak_file_path); 73 PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &pak_file_path);
73 pak_file_path = pak_file_path.AppendASCII("webviewchromium.pak"); 74 pak_file_path = pak_file_path.AppendASCII("webviewchromium.pak");
74 ui::LoadMainAndroidPackFile("assets/webviewchromium.pak", pak_file_path); 75 ui::LoadMainAndroidPackFile("assets/webviewchromium.pak", pak_file_path);
75 76
76 base::android::MemoryPressureListenerAndroid::RegisterSystemCallback( 77 base::android::MemoryPressureListenerAndroid::RegisterSystemCallback(
77 base::android::AttachCurrentThread()); 78 base::android::AttachCurrentThread());
78 DeferredGpuCommandService::SetInstance(); 79 DeferredGpuCommandService::SetInstance();
80 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
81 switches::kSingleProcess)) {
82 crash_micro_dump_manager_.reset(new breakpad::CrashMicroDumpManager());
83 }
79 84
80 return content::RESULT_CODE_NORMAL_EXIT; 85 return content::RESULT_CODE_NORMAL_EXIT;
81 } 86 }
82 87
83 void AwBrowserMainParts::PreMainMessageLoopRun() { 88 void AwBrowserMainParts::PreMainMessageLoopRun() {
84 browser_context_->PreMainMessageLoopRun(); 89 browser_context_->PreMainMessageLoopRun();
85 90
86 AwDevToolsDiscoveryProvider::Install(); 91 AwDevToolsDiscoveryProvider::Install();
87 92
88 media::SetMediaClientAndroid( 93 media::SetMediaClientAndroid(
(...skipping 10 matching lines...) Expand all
99 } 104 }
100 } 105 }
101 106
102 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { 107 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) {
103 // Android WebView does not use default MessageLoop. It has its own 108 // Android WebView does not use default MessageLoop. It has its own
104 // Android specific MessageLoop. 109 // Android specific MessageLoop.
105 return true; 110 return true;
106 } 111 }
107 112
108 } // namespace android_webview 113 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698