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

Side by Side Diff: chrome/browser/chrome_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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after
2813 base::MemoryMappedFile::Region region; 2813 base::MemoryMappedFile::Region region;
2814 int fd = ui::GetMainAndroidPackFd(&region); 2814 int fd = ui::GetMainAndroidPackFd(&region);
2815 mappings->ShareWithRegion(kAndroidUIResourcesPakDescriptor, fd, region); 2815 mappings->ShareWithRegion(kAndroidUIResourcesPakDescriptor, fd, region);
2816 2816
2817 fd = ui::GetCommonResourcesPackFd(&region); 2817 fd = ui::GetCommonResourcesPackFd(&region);
2818 mappings->ShareWithRegion(kAndroidChrome100PercentPakDescriptor, fd, region); 2818 mappings->ShareWithRegion(kAndroidChrome100PercentPakDescriptor, fd, region);
2819 2819
2820 fd = ui::GetLocalePackFd(&region); 2820 fd = ui::GetLocalePackFd(&region);
2821 mappings->ShareWithRegion(kAndroidLocalePakDescriptor, fd, region); 2821 mappings->ShareWithRegion(kAndroidLocalePakDescriptor, fd, region);
2822 2822
2823 if (breakpad::IsCrashReporterEnabled()) { 2823 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted(
2824 base::File file = 2824 child_process_id, mappings);
2825 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile(
2826 child_process_id);
2827 if (file.IsValid()) {
2828 mappings->Transfer(kAndroidMinidumpDescriptor,
2829 base::ScopedFD(file.TakePlatformFile()));
2830 } else {
2831 LOG(ERROR) << "Failed to create file for minidump, crash reporting will "
2832 "be disabled for this process.";
2833 }
2834 }
2835 2825
2836 base::FilePath app_data_path; 2826 base::FilePath app_data_path;
2837 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); 2827 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path);
2838 DCHECK(!app_data_path.empty()); 2828 DCHECK(!app_data_path.empty());
2839 #else 2829 #else
2840 int crash_signal_fd = GetCrashSignalFD(command_line); 2830 int crash_signal_fd = GetCrashSignalFD(command_line);
2841 if (crash_signal_fd >= 0) { 2831 if (crash_signal_fd >= 0) {
2842 mappings->Share(kCrashDumpSignal, crash_signal_fd); 2832 mappings->Share(kCrashDumpSignal, crash_signal_fd);
2843 } 2833 }
2844 #endif // defined(OS_ANDROID) 2834 #endif // defined(OS_ANDROID)
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
3363 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { 3353 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() {
3364 return variations::GetVariationParamValue( 3354 return variations::GetVariationParamValue(
3365 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; 3355 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true";
3366 } 3356 }
3367 3357
3368 bool ChromeContentBrowserClient:: 3358 bool ChromeContentBrowserClient::
3369 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3359 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3370 return variations::GetVariationParamValue( 3360 return variations::GetVariationParamValue(
3371 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3361 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3372 } 3362 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main_android.cc ('k') | chromecast/browser/cast_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698