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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 9838033: Upstream native crash handling changes for Android. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed a stale comment. Created 8 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 | Annotate | Revision Log
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 <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 #if defined(USE_AURA) 124 #if defined(USE_AURA)
125 #include "chrome/browser/chrome_browser_main_extra_parts_aura.h" 125 #include "chrome/browser/chrome_browser_main_extra_parts_aura.h"
126 #endif 126 #endif
127 127
128 #if defined(USE_ASH) 128 #if defined(USE_ASH)
129 #include "chrome/browser/chrome_browser_main_extra_parts_ash.h" 129 #include "chrome/browser/chrome_browser_main_extra_parts_ash.h"
130 #endif 130 #endif
131 131
132 #if defined(OS_LINUX) || defined(OS_OPENBSD) 132 #if defined(OS_LINUX) || defined(OS_OPENBSD)
133 #include "base/linux_util.h" 133 #include "base/linux_util.h"
134 #include "chrome/browser/crash_handler_host_linux.h" 134 #include "chrome/browser/crash_handler_host_posix.h"
135 #endif 135 #endif
136 136
137 #if defined(TOOLKIT_GTK) 137 #if defined(TOOLKIT_GTK)
138 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_gtk.h" 138 #include "chrome/browser/tab_contents/chrome_web_contents_view_delegate_gtk.h"
139 #endif 139 #endif
140 #if defined(USE_NSS) 140 #if defined(USE_NSS)
141 #include "chrome/browser/ui/crypto_module_password_dialog.h" 141 #include "chrome/browser/ui/crypto_module_password_dialog.h"
142 #endif 142 #endif
143 143
144 using content::AccessTokenStore; 144 using content::AccessTokenStore;
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 return false; 674 return false;
675 } 675 }
676 676
677 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName( 677 std::string ChromeContentBrowserClient::GetCanonicalEncodingNameByAliasName(
678 const std::string& alias_name) { 678 const std::string& alias_name) {
679 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name); 679 return CharacterEncoding::GetCanonicalEncodingNameByAliasName(alias_name);
680 } 680 }
681 681
682 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( 682 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(
683 CommandLine* command_line, int child_process_id) { 683 CommandLine* command_line, int child_process_id) {
684 #if defined(USE_LINUX_BREAKPAD) 684 #if defined(USE_POSIX_BREAKPAD)
685 if (IsCrashReporterEnabled()) { 685 if (IsCrashReporterEnabled()) {
686 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, 686 command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
687 child_process_logging::GetClientId() + "," + base::GetLinuxDistro()); 687 child_process_logging::GetClientId() + "," + base::GetLinuxDistro());
688 } 688 }
689 #elif defined(OS_MACOSX) 689 #elif defined(OS_MACOSX)
690 if (IsCrashReporterEnabled()) { 690 if (IsCrashReporterEnabled()) {
691 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, 691 command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
692 child_process_logging::GetClientId()); 692 child_process_logging::GetClientId());
693 } 693 }
694 #endif // OS_MACOSX 694 #endif // OS_MACOSX
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 1580
1581 if (extension->HasAPIPermission(ExtensionAPIPermission::kSocket)) 1581 if (extension->HasAPIPermission(ExtensionAPIPermission::kSocket))
1582 return true; 1582 return true;
1583 1583
1584 return false; 1584 return false;
1585 } 1585 }
1586 1586
1587 #if defined(OS_POSIX) && !defined(OS_MACOSX) 1587 #if defined(OS_POSIX) && !defined(OS_MACOSX)
1588 int ChromeContentBrowserClient::GetCrashSignalFD( 1588 int ChromeContentBrowserClient::GetCrashSignalFD(
1589 const CommandLine& command_line) { 1589 const CommandLine& command_line) {
1590 #if defined(OS_ANDROID) 1590 #if defined(OS_ANDROID)
Yaron 2012/04/04 21:41:04 I didn't mean to get rid of just the TODO... You s
carlosvaldivia 2012/04/04 21:54:09 Done.
1591 // TODO(carlosvaldivia): Upstream breakpad code for Android and remove this
1592 // fork. http://crbug.com/113560
1593 NOTIMPLEMENTED(); 1591 NOTIMPLEMENTED();
1594 #else 1592 #else
1595 if (command_line.HasSwitch(switches::kExtensionProcess)) { 1593 if (command_line.HasSwitch(switches::kExtensionProcess)) {
1596 ExtensionCrashHandlerHostLinux* crash_handler = 1594 ExtensionCrashHandlerHostPosix* crash_handler =
1597 ExtensionCrashHandlerHostLinux::GetInstance(); 1595 ExtensionCrashHandlerHostPosix::GetInstance();
1598 return crash_handler->GetDeathSignalSocket(); 1596 return crash_handler->GetDeathSignalSocket();
1599 } 1597 }
1600 1598
1601 std::string process_type = 1599 std::string process_type =
1602 command_line.GetSwitchValueASCII(switches::kProcessType); 1600 command_line.GetSwitchValueASCII(switches::kProcessType);
1603 1601
1604 if (process_type == switches::kRendererProcess) 1602 if (process_type == switches::kRendererProcess)
1605 return RendererCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); 1603 return RendererCrashHandlerHostPosix::GetInstance()->GetDeathSignalSocket();
1606 1604
1607 if (process_type == switches::kPluginProcess) 1605 if (process_type == switches::kPluginProcess)
1608 return PluginCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); 1606 return PluginCrashHandlerHostPosix::GetInstance()->GetDeathSignalSocket();
1609 1607
1610 if (process_type == switches::kPpapiPluginProcess) 1608 if (process_type == switches::kPpapiPluginProcess)
1611 return PpapiCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); 1609 return PpapiCrashHandlerHostPosix::GetInstance()->GetDeathSignalSocket();
1612 1610
1613 if (process_type == switches::kGpuProcess) 1611 if (process_type == switches::kGpuProcess)
1614 return GpuCrashHandlerHostLinux::GetInstance()->GetDeathSignalSocket(); 1612 return GpuCrashHandlerHostPosix::GetInstance()->GetDeathSignalSocket();
1615 #endif // defined(OS_ANDROID) 1613 #endif // defined(OS_ANDROID)
1616 1614
1617 return -1; 1615 return -1;
1618 } 1616 }
1619 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) 1617 #endif // defined(OS_POSIX) && !defined(OS_MACOSX)
1620 1618
1621 #if defined(OS_WIN) 1619 #if defined(OS_WIN)
1622 const wchar_t* ChromeContentBrowserClient::GetResourceDllName() { 1620 const wchar_t* ChromeContentBrowserClient::GetResourceDllName() {
1623 return chrome::kBrowserResourcesDll; 1621 return chrome::kBrowserResourcesDll;
1624 } 1622 }
1625 #endif 1623 #endif
1626 1624
1627 #if defined(USE_NSS) 1625 #if defined(USE_NSS)
1628 crypto::CryptoModuleBlockingPasswordDelegate* 1626 crypto::CryptoModuleBlockingPasswordDelegate*
1629 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 1627 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
1630 const GURL& url) { 1628 const GURL& url) {
1631 return browser::NewCryptoModuleBlockingDialogDelegate( 1629 return browser::NewCryptoModuleBlockingDialogDelegate(
1632 browser::kCryptoModulePasswordKeygen, url.host()); 1630 browser::kCryptoModulePasswordKeygen, url.host());
1633 } 1631 }
1634 #endif 1632 #endif
1635 1633
1636 } // namespace chrome 1634 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698