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

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

Issue 2393853002: Refactor CrashDump*Manager to use a shared CrashDumpObserver singleton. (Closed)
Patch Set: Rebase Created 3 years, 11 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 17 matching lines...) Expand all
28 #include "android_webview/grit/aw_resources.h" 28 #include "android_webview/grit/aw_resources.h"
29 #include "base/android/locale_utils.h" 29 #include "base/android/locale_utils.h"
30 #include "base/base_paths_android.h" 30 #include "base/base_paths_android.h"
31 #include "base/command_line.h" 31 #include "base/command_line.h"
32 #include "base/files/scoped_file.h" 32 #include "base/files/scoped_file.h"
33 #include "base/json/json_reader.h" 33 #include "base/json/json_reader.h"
34 #include "base/memory/ptr_util.h" 34 #include "base/memory/ptr_util.h"
35 #include "base/path_service.h" 35 #include "base/path_service.h"
36 #include "components/autofill/content/browser/content_autofill_driver_factory.h" 36 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
37 #include "components/cdm/browser/cdm_message_filter_android.h" 37 #include "components/cdm/browser/cdm_message_filter_android.h"
38 #include "components/crash/content/browser/crash_micro_dump_manager_android.h" 38 #include "components/crash/content/browser/crash_dump_observer_android.h"
39 #include "components/navigation_interception/intercept_navigation_delegate.h" 39 #include "components/navigation_interception/intercept_navigation_delegate.h"
40 #include "components/spellcheck/spellcheck_build_features.h" 40 #include "components/spellcheck/spellcheck_build_features.h"
41 #include "content/public/browser/browser_message_filter.h" 41 #include "content/public/browser/browser_message_filter.h"
42 #include "content/public/browser/browser_thread.h" 42 #include "content/public/browser/browser_thread.h"
43 #include "content/public/browser/child_process_security_policy.h" 43 #include "content/public/browser/child_process_security_policy.h"
44 #include "content/public/browser/client_certificate_delegate.h" 44 #include "content/public/browser/client_certificate_delegate.h"
45 #include "content/public/browser/navigation_handle.h" 45 #include "content/public/browser/navigation_handle.h"
46 #include "content/public/browser/navigation_throttle.h" 46 #include "content/public/browser/navigation_throttle.h"
47 #include "content/public/browser/render_frame_host.h" 47 #include "content/public/browser/render_frame_host.h"
48 #include "content/public/browser/render_process_host.h" 48 #include "content/public/browser/render_process_host.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 base::MemoryMappedFile::Region region; 478 base::MemoryMappedFile::Region region;
479 int fd = ui::GetMainAndroidPackFd(&region); 479 int fd = ui::GetMainAndroidPackFd(&region);
480 mappings->ShareWithRegion(kAndroidWebViewMainPakDescriptor, fd, region); 480 mappings->ShareWithRegion(kAndroidWebViewMainPakDescriptor, fd, region);
481 481
482 fd = ui::GetCommonResourcesPackFd(&region); 482 fd = ui::GetCommonResourcesPackFd(&region);
483 mappings->ShareWithRegion(kAndroidWebView100PercentPakDescriptor, fd, region); 483 mappings->ShareWithRegion(kAndroidWebView100PercentPakDescriptor, fd, region);
484 484
485 fd = ui::GetLocalePackFd(&region); 485 fd = ui::GetLocalePackFd(&region);
486 mappings->ShareWithRegion(kAndroidWebViewLocalePakDescriptor, fd, region); 486 mappings->ShareWithRegion(kAndroidWebViewLocalePakDescriptor, fd, region);
487 487
488 base::ScopedFD crash_signal_file = 488 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted(
489 breakpad::CrashMicroDumpManager::GetInstance()->CreateCrashInfoChannel( 489 child_process_id, mappings);
490 child_process_id);
491 if (crash_signal_file.is_valid()) {
492 mappings->Transfer(kAndroidWebViewCrashSignalDescriptor,
493 std::move(crash_signal_file));
494 }
495 } 490 }
496 491
497 void AwContentBrowserClient::OverrideWebkitPrefs( 492 void AwContentBrowserClient::OverrideWebkitPrefs(
498 content::RenderViewHost* rvh, 493 content::RenderViewHost* rvh,
499 content::WebPreferences* web_prefs) { 494 content::WebPreferences* web_prefs) {
500 if (!preferences_populater_.get()) { 495 if (!preferences_populater_.get()) {
501 preferences_populater_ = 496 preferences_populater_ =
502 base::WrapUnique(native_factory_->CreateWebPreferencesPopulater()); 497 base::WrapUnique(native_factory_->CreateWebPreferencesPopulater());
503 } 498 }
504 preferences_populater_->PopulateFor( 499 preferences_populater_->PopulateFor(
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 render_frame_host)); 544 render_frame_host));
550 545
551 // Although WebView does not support password manager feature, renderer code 546 // Although WebView does not support password manager feature, renderer code
552 // could still request this interface, so we register a dummy binder which 547 // could still request this interface, so we register a dummy binder which
553 // just drops the incoming request, to avoid the 'Failed to locate a binder 548 // just drops the incoming request, to avoid the 'Failed to locate a binder
554 // for interface' error log.. 549 // for interface' error log..
555 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver)); 550 registry->AddInterface(base::Bind(&DummyBindPasswordManagerDriver));
556 } 551 }
557 552
558 } // namespace android_webview 553 } // 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