OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/app/breakpad_win.h" | 5 #include "chrome/app/breakpad_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 #include <tchar.h> | 9 #include <tchar.h> |
10 | 10 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 StartsWith(flag, L"--flash-broker=", true) || | 112 StartsWith(flag, L"--flash-broker=", true) || |
113 | 113 |
114 // Just about everything has this, don't bother. | 114 // Just about everything has this, don't bother. |
115 StartsWith(flag, L"/prefetch:", true) || | 115 StartsWith(flag, L"/prefetch:", true) || |
116 | 116 |
117 // We handle the plugin path separately since it is usually too big | 117 // We handle the plugin path separately since it is usually too big |
118 // to fit in the switches (limited to 63 characters). | 118 // to fit in the switches (limited to 63 characters). |
119 StartsWith(flag, L"--plugin-path=", true) || | 119 StartsWith(flag, L"--plugin-path=", true) || |
120 | 120 |
121 // This is too big so we end up truncating it anyway. | 121 // This is too big so we end up truncating it anyway. |
122 StartsWith(flag, L"--force-fieldtest=", true); | 122 StartsWith(flag, L"--force-fieldtest=", true) || |
| 123 |
| 124 // These surround the flags that were added by about:flags, it lets |
| 125 // you distinguish which flags were added manually via the command |
| 126 // line versus those added through about:flags. For the most part |
| 127 // we don't care how an option was enabled, so we strip these. |
| 128 // (If you need to know can always look at the PEB). |
| 129 flag == L"--flag-switches-begin" || |
| 130 flag == L"--flag-switches-end"; |
123 } | 131 } |
124 | 132 |
125 extern "C" void __declspec(dllexport) __cdecl SetCommandLine( | 133 extern "C" void __declspec(dllexport) __cdecl SetCommandLine( |
126 const CommandLine* command_line) { | 134 const CommandLine* command_line) { |
127 if (!g_custom_entries) | 135 if (!g_custom_entries) |
128 return; | 136 return; |
129 | 137 |
130 const CommandLine::StringVector& argv = command_line->argv(); | 138 const CommandLine::StringVector& argv = command_line->argv(); |
131 | 139 |
132 // Copy up to the kMaxSwitches arguments into the custom entries array. Skip | 140 // Copy up to the kMaxSwitches arguments into the custom entries array. Skip |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 if (QueueUserWorkItem( | 730 if (QueueUserWorkItem( |
723 &InitCrashReporterThread, | 731 &InitCrashReporterThread, |
724 info, | 732 info, |
725 WT_EXECUTELONGFUNCTION) == 0) { | 733 WT_EXECUTELONGFUNCTION) == 0) { |
726 // We failed to queue to the worker pool, initialize in this thread. | 734 // We failed to queue to the worker pool, initialize in this thread. |
727 InitCrashReporterThread(info); | 735 InitCrashReporterThread(info); |
728 } | 736 } |
729 } | 737 } |
730 } | 738 } |
731 } | 739 } |
OLD | NEW |