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

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

Issue 2200693002: Refactor CrashDump*Manager to use a shared CrashDumpObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 2 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_content_browser_client.h" 5 #include "android_webview/browser/aw_content_browser_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_browser_main_parts.h" 10 #include "android_webview/browser/aw_browser_main_parts.h"
(...skipping 14 matching lines...) Expand all
25 #include "android_webview/common/aw_switches.h" 25 #include "android_webview/common/aw_switches.h"
26 #include "android_webview/common/render_view_messages.h" 26 #include "android_webview/common/render_view_messages.h"
27 #include "android_webview/common/url_constants.h" 27 #include "android_webview/common/url_constants.h"
28 #include "base/android/locale_utils.h" 28 #include "base/android/locale_utils.h"
29 #include "base/base_paths_android.h" 29 #include "base/base_paths_android.h"
30 #include "base/command_line.h" 30 #include "base/command_line.h"
31 #include "base/files/scoped_file.h" 31 #include "base/files/scoped_file.h"
32 #include "base/memory/ptr_util.h" 32 #include "base/memory/ptr_util.h"
33 #include "base/path_service.h" 33 #include "base/path_service.h"
34 #include "components/cdm/browser/cdm_message_filter_android.h" 34 #include "components/cdm/browser/cdm_message_filter_android.h"
35 #include "components/crash/content/browser/crash_micro_dump_manager_android.h" 35 #include "components/crash/content/browser/crash_dump_observer_android.h"
36 #include "components/navigation_interception/intercept_navigation_delegate.h" 36 #include "components/navigation_interception/intercept_navigation_delegate.h"
37 #include "content/public/browser/browser_message_filter.h" 37 #include "content/public/browser/browser_message_filter.h"
38 #include "content/public/browser/browser_thread.h" 38 #include "content/public/browser/browser_thread.h"
39 #include "content/public/browser/child_process_security_policy.h" 39 #include "content/public/browser/child_process_security_policy.h"
40 #include "content/public/browser/client_certificate_delegate.h" 40 #include "content/public/browser/client_certificate_delegate.h"
41 #include "content/public/browser/navigation_handle.h" 41 #include "content/public/browser/navigation_handle.h"
42 #include "content/public/browser/navigation_throttle.h" 42 #include "content/public/browser/navigation_throttle.h"
43 #include "content/public/browser/render_frame_host.h" 43 #include "content/public/browser/render_frame_host.h"
44 #include "content/public/browser/render_process_host.h" 44 #include "content/public/browser/render_process_host.h"
45 #include "content/public/browser/render_view_host.h" 45 #include "content/public/browser/render_view_host.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 int child_process_id, 480 int child_process_id,
481 content::FileDescriptorInfo* mappings, 481 content::FileDescriptorInfo* mappings,
482 std::map<int, base::MemoryMappedFile::Region>* regions) { 482 std::map<int, base::MemoryMappedFile::Region>* regions) {
483 int fd = ui::GetMainAndroidPackFd( 483 int fd = ui::GetMainAndroidPackFd(
484 &(*regions)[kAndroidWebViewMainPakDescriptor]); 484 &(*regions)[kAndroidWebViewMainPakDescriptor]);
485 mappings->Share(kAndroidWebViewMainPakDescriptor, fd); 485 mappings->Share(kAndroidWebViewMainPakDescriptor, fd);
486 486
487 fd = ui::GetLocalePackFd(&(*regions)[kAndroidWebViewLocalePakDescriptor]); 487 fd = ui::GetLocalePackFd(&(*regions)[kAndroidWebViewLocalePakDescriptor]);
488 mappings->Share(kAndroidWebViewLocalePakDescriptor, fd); 488 mappings->Share(kAndroidWebViewLocalePakDescriptor, fd);
489 489
490 base::ScopedFD crash_signal_file = 490 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted(
491 breakpad::CrashMicroDumpManager::GetInstance()->CreateCrashInfoChannel( 491 child_process_id, mappings);
492 child_process_id);
493 if (crash_signal_file.is_valid()) {
494 mappings->Transfer(kAndroidWebViewCrashSignalDescriptor,
495 std::move(crash_signal_file));
496 }
497 } 492 }
498 493
499 void AwContentBrowserClient::OverrideWebkitPrefs( 494 void AwContentBrowserClient::OverrideWebkitPrefs(
500 content::RenderViewHost* rvh, 495 content::RenderViewHost* rvh,
501 content::WebPreferences* web_prefs) { 496 content::WebPreferences* web_prefs) {
502 if (!preferences_populater_.get()) { 497 if (!preferences_populater_.get()) {
503 preferences_populater_ = 498 preferences_populater_ =
504 base::WrapUnique(native_factory_->CreateWebPreferencesPopulater()); 499 base::WrapUnique(native_factory_->CreateWebPreferencesPopulater());
505 } 500 }
506 preferences_populater_->PopulateFor( 501 preferences_populater_->PopulateFor(
(...skipping 14 matching lines...) Expand all
521 } 516 }
522 return throttles; 517 return throttles;
523 } 518 }
524 519
525 content::DevToolsManagerDelegate* 520 content::DevToolsManagerDelegate*
526 AwContentBrowserClient::GetDevToolsManagerDelegate() { 521 AwContentBrowserClient::GetDevToolsManagerDelegate() {
527 return new AwDevToolsManagerDelegate(); 522 return new AwDevToolsManagerDelegate();
528 } 523 }
529 524
530 } // namespace android_webview 525 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_terminator.cc ('k') | chrome/browser/chrome_browser_main_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698