Chromium Code Reviews| 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/browser/ui/browser_init.h" | 5 #include "chrome/browser/ui/browser_init.h" |
| 6 | 6 |
| 7 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
| 8 | 8 |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/event_recorder.h" | 10 #include "base/event_recorder.h" |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 923 // it is closed. | 923 // it is closed. |
| 924 tab->AddInfoBar(new SessionCrashedInfoBarDelegate(tab)); | 924 tab->AddInfoBar(new SessionCrashedInfoBarDelegate(tab)); |
| 925 } | 925 } |
| 926 } | 926 } |
| 927 | 927 |
| 928 void BrowserInit::LaunchWithProfile::AddBadFlagsInfoBarIfNecessary( | 928 void BrowserInit::LaunchWithProfile::AddBadFlagsInfoBarIfNecessary( |
| 929 TabContents* tab) { | 929 TabContents* tab) { |
| 930 // Unsupported flags for which to display a warning that "stability and | 930 // Unsupported flags for which to display a warning that "stability and |
| 931 // security will suffer". | 931 // security will suffer". |
| 932 static const char* kBadFlags[] = { | 932 static const char* kBadFlags[] = { |
| 933 // All imply disabling the sandbox. | 933 // These imply disabling the sandbox. |
| 934 switches::kSingleProcess, | 934 switches::kSingleProcess, |
| 935 switches::kNoSandbox, | 935 switches::kNoSandbox, |
| 936 switches::kInProcessWebGL, | 936 switches::kInProcessWebGL, |
| 937 // These are scary features for developers that shouldn't be turn on | |
|
Avi (use Gerrit)
2011/01/25 21:12:52
grammar drive-by: turned on
| |
| 938 // persistently. | |
| 939 switches::kEnableNaCl, | |
| 937 NULL | 940 NULL |
| 938 }; | 941 }; |
| 939 | 942 |
| 940 const char* bad_flag = NULL; | 943 const char* bad_flag = NULL; |
| 941 for (const char** flag = kBadFlags; *flag; ++flag) { | 944 for (const char** flag = kBadFlags; *flag; ++flag) { |
| 942 if (command_line_.HasSwitch(*flag)) { | 945 if (command_line_.HasSwitch(*flag)) { |
| 943 bad_flag = *flag; | 946 bad_flag = *flag; |
| 944 break; | 947 break; |
| 945 } | 948 } |
| 946 } | 949 } |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1189 return false; | 1192 return false; |
| 1190 automation->SetExpectedTabCount(expected_tabs); | 1193 automation->SetExpectedTabCount(expected_tabs); |
| 1191 | 1194 |
| 1192 AutomationProviderList* list = | 1195 AutomationProviderList* list = |
| 1193 g_browser_process->InitAutomationProviderList(); | 1196 g_browser_process->InitAutomationProviderList(); |
| 1194 DCHECK(list); | 1197 DCHECK(list); |
| 1195 list->AddProvider(automation); | 1198 list->AddProvider(automation); |
| 1196 | 1199 |
| 1197 return true; | 1200 return true; |
| 1198 } | 1201 } |
| OLD | NEW |