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

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

Issue 2806733002: aw: Fix multiprocess flag usage (Closed)
Patch Set: Also fix breakpad component so that single process microdump ptype is right. Created 3 years, 8 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
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_browser_terminator.h" 8 #include "android_webview/browser/aw_browser_terminator.h"
9 #include "android_webview/browser/aw_content_browser_client.h" 9 #include "android_webview/browser/aw_content_browser_client.h"
10 #include "android_webview/browser/aw_result_codes.h" 10 #include "android_webview/browser/aw_result_codes.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 base::FilePath crash_dir; 125 base::FilePath crash_dir;
126 if (PathService::Get(android_webview::DIR_CRASH_DUMPS, &crash_dir)) { 126 if (PathService::Get(android_webview::DIR_CRASH_DUMPS, &crash_dir)) {
127 if (!base::PathExists(crash_dir)) 127 if (!base::PathExists(crash_dir))
128 base::CreateDirectory(crash_dir); 128 base::CreateDirectory(crash_dir);
129 breakpad::CrashDumpObserver::GetInstance()->RegisterClient( 129 breakpad::CrashDumpObserver::GetInstance()->RegisterClient(
130 base::MakeUnique<breakpad::CrashDumpManager>( 130 base::MakeUnique<breakpad::CrashDumpManager>(
131 crash_dir, kAndroidMinidumpDescriptor)); 131 crash_dir, kAndroidMinidumpDescriptor));
132 } 132 }
133 } 133 }
134 134
135 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 135 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
136 switches::kSingleProcess)) { 136 switches::kWebViewSandboxedRenderer)) {
137 // Create the renderers crash manager on the UI thread. 137 // Create the renderers crash manager on the UI thread.
138 breakpad::CrashDumpObserver::GetInstance()->RegisterClient( 138 breakpad::CrashDumpObserver::GetInstance()->RegisterClient(
139 base::MakeUnique<AwBrowserTerminator>()); 139 base::MakeUnique<AwBrowserTerminator>());
140 } 140 }
141 141
142 return content::RESULT_CODE_NORMAL_EXIT; 142 return content::RESULT_CODE_NORMAL_EXIT;
143 } 143 }
144 144
145 void AwBrowserMainParts::PreMainMessageLoopRun() { 145 void AwBrowserMainParts::PreMainMessageLoopRun() {
146 browser_client_->InitBrowserContext()->PreMainMessageLoopRun(); 146 browser_client_->InitBrowserContext()->PreMainMessageLoopRun();
147 147
148 device::GeolocationProvider::SetGeolocationDelegate( 148 device::GeolocationProvider::SetGeolocationDelegate(
149 new AwGeolocationDelegate()); 149 new AwGeolocationDelegate());
150 150
151 content::RenderFrameHost::AllowInjectingJavaScriptForAndroidWebView(); 151 content::RenderFrameHost::AllowInjectingJavaScriptForAndroidWebView();
152 } 152 }
153 153
154 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { 154 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) {
155 // Android WebView does not use default MessageLoop. It has its own 155 // Android WebView does not use default MessageLoop. It has its own
156 // Android specific MessageLoop. 156 // Android specific MessageLoop.
157 return true; 157 return true;
158 } 158 }
159 159
160 } // namespace android_webview 160 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698