OLD | NEW |
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 "content/public/app/content_main_runner.h" | 5 #include "content/public/app/content_main_runner.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <string> | 10 #include <string> |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 // when presenting them to the user), reset the locale for numeric | 198 // when presenting them to the user), reset the locale for numeric |
199 // formatting. | 199 // formatting. |
200 // Note that this is not correct for plugin processes -- they can | 200 // Note that this is not correct for plugin processes -- they can |
201 // surface UI -- but it's likely they get this wrong too so why not. | 201 // surface UI -- but it's likely they get this wrong too so why not. |
202 setlocale(LC_NUMERIC, "C"); | 202 setlocale(LC_NUMERIC, "C"); |
203 #endif | 203 #endif |
204 | 204 |
205 #if !defined(OFFICIAL_BUILD) | 205 #if !defined(OFFICIAL_BUILD) |
206 // Print stack traces to stderr when crashes occur. This opens up security | 206 // Print stack traces to stderr when crashes occur. This opens up security |
207 // holes so it should never be enabled for official builds. | 207 // holes so it should never be enabled for official builds. |
208 base::debug::EnableInProcessStackDumping(); | 208 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 209 switches::kDisableInProcessStackTraces)) { |
| 210 base::debug::EnableInProcessStackDumping(); |
| 211 } |
209 #if defined(OS_WIN) | 212 #if defined(OS_WIN) |
210 base::RouteStdioToConsole(false); | 213 base::RouteStdioToConsole(false); |
211 LoadLibraryA("dbghelp.dll"); | 214 LoadLibraryA("dbghelp.dll"); |
212 #endif | 215 #endif |
213 #endif | 216 #endif |
214 } | 217 } |
215 | 218 |
216 class ContentClientInitializer { | 219 class ContentClientInitializer { |
217 public: | 220 public: |
218 static void Set(const std::string& process_type, | 221 static void Set(const std::string& process_type, |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 | 828 |
826 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 829 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
827 }; | 830 }; |
828 | 831 |
829 // static | 832 // static |
830 ContentMainRunner* ContentMainRunner::Create() { | 833 ContentMainRunner* ContentMainRunner::Create() { |
831 return new ContentMainRunnerImpl(); | 834 return new ContentMainRunnerImpl(); |
832 } | 835 } |
833 | 836 |
834 } // namespace content | 837 } // namespace content |
OLD | NEW |