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

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: Review changes: remove refcounting, ability to unregister clients, move responsibility for posting to clients Created 4 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 "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 2810 matching lines...) Expand 10 before | Expand all | Expand 10 after
2821 &(*regions)[kAndroidUIResourcesPakDescriptor]); 2821 &(*regions)[kAndroidUIResourcesPakDescriptor]);
2822 mappings->Share(kAndroidUIResourcesPakDescriptor, fd); 2822 mappings->Share(kAndroidUIResourcesPakDescriptor, fd);
2823 2823
2824 fd = ui::GetCommonResourcesPackFd( 2824 fd = ui::GetCommonResourcesPackFd(
2825 &(*regions)[kAndroidChrome100PercentPakDescriptor]); 2825 &(*regions)[kAndroidChrome100PercentPakDescriptor]);
2826 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd); 2826 mappings->Share(kAndroidChrome100PercentPakDescriptor, fd);
2827 2827
2828 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]); 2828 fd = ui::GetLocalePackFd(&(*regions)[kAndroidLocalePakDescriptor]);
2829 mappings->Share(kAndroidLocalePakDescriptor, fd); 2829 mappings->Share(kAndroidLocalePakDescriptor, fd);
2830 2830
2831 if (breakpad::IsCrashReporterEnabled()) { 2831 breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted(
2832 base::File file = 2832 child_process_id, mappings);
2833 breakpad::CrashDumpManager::GetInstance()->CreateMinidumpFile(
2834 child_process_id);
2835 if (file.IsValid()) {
2836 mappings->Transfer(kAndroidMinidumpDescriptor,
2837 base::ScopedFD(file.TakePlatformFile()));
2838 } else {
2839 LOG(ERROR) << "Failed to create file for minidump, crash reporting will "
2840 "be disabled for this process.";
2841 }
2842 }
2843 2833
2844 base::FilePath app_data_path; 2834 base::FilePath app_data_path;
2845 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path); 2835 PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path);
2846 DCHECK(!app_data_path.empty()); 2836 DCHECK(!app_data_path.empty());
2847 } 2837 }
2848 #elif defined(OS_POSIX) && !defined(OS_MACOSX) 2838 #elif defined(OS_POSIX) && !defined(OS_MACOSX)
2849 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess( 2839 void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
2850 const base::CommandLine& command_line, 2840 const base::CommandLine& command_line,
2851 int child_process_id, 2841 int child_process_id,
2852 FileDescriptorInfo* mappings) { 2842 FileDescriptorInfo* mappings) {
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
3310 render_frame_host, std::move(source), std::move(request)); 3300 render_frame_host, std::move(source), std::move(request));
3311 #else 3301 #else
3312 // Chrome's media remoting implementation depends on the Media Router 3302 // Chrome's media remoting implementation depends on the Media Router
3313 // infrastructure to identify remote sinks and provide the user interface for 3303 // infrastructure to identify remote sinks and provide the user interface for
3314 // sink selection. In the case where the Media Router is not present, simply 3304 // sink selection. In the case where the Media Router is not present, simply
3315 // drop the interface request. This will prevent code paths for media remoting 3305 // drop the interface request. This will prevent code paths for media remoting
3316 // in the renderer process from activating. 3306 // in the renderer process from activating.
3317 #endif 3307 #endif
3318 } 3308 }
3319 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) 3309 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698