| 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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 // it is closed. | 1041 // it is closed. |
| 1042 tab->AddInfoBar(new SessionCrashedInfoBarDelegate(tab->tab_contents())); | 1042 tab->AddInfoBar(new SessionCrashedInfoBarDelegate(tab->tab_contents())); |
| 1043 } | 1043 } |
| 1044 } | 1044 } |
| 1045 | 1045 |
| 1046 void BrowserInit::LaunchWithProfile::AddBadFlagsInfoBarIfNecessary( | 1046 void BrowserInit::LaunchWithProfile::AddBadFlagsInfoBarIfNecessary( |
| 1047 TabContentsWrapper* tab) { | 1047 TabContentsWrapper* tab) { |
| 1048 // Unsupported flags for which to display a warning that "stability and | 1048 // Unsupported flags for which to display a warning that "stability and |
| 1049 // security will suffer". | 1049 // security will suffer". |
| 1050 static const char* kBadFlags[] = { | 1050 static const char* kBadFlags[] = { |
| 1051 // Warn when accelerated 2d canvas is enabled as its presence can | |
| 1052 // affect stability and rendering correctness of certain pages. | |
| 1053 // TODO(vangelis): Remove when accelerated 2d canvas is enabled by default. | |
| 1054 switches::kEnableAccelerated2dCanvas, | |
| 1055 // These imply disabling the sandbox. | 1051 // These imply disabling the sandbox. |
| 1056 switches::kSingleProcess, | 1052 switches::kSingleProcess, |
| 1057 switches::kNoSandbox, | 1053 switches::kNoSandbox, |
| 1058 switches::kInProcessWebGL, | 1054 switches::kInProcessWebGL, |
| 1059 NULL | 1055 NULL |
| 1060 }; | 1056 }; |
| 1061 | 1057 |
| 1062 const char* bad_flag = NULL; | 1058 const char* bad_flag = NULL; |
| 1063 for (const char** flag = kBadFlags; *flag; ++flag) { | 1059 for (const char** flag = kBadFlags; *flag; ++flag) { |
| 1064 if (command_line_.HasSwitch(*flag)) { | 1060 if (command_line_.HasSwitch(*flag)) { |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 return false; | 1425 return false; |
| 1430 automation->SetExpectedTabCount(expected_tabs); | 1426 automation->SetExpectedTabCount(expected_tabs); |
| 1431 | 1427 |
| 1432 AutomationProviderList* list = | 1428 AutomationProviderList* list = |
| 1433 g_browser_process->InitAutomationProviderList(); | 1429 g_browser_process->InitAutomationProviderList(); |
| 1434 DCHECK(list); | 1430 DCHECK(list); |
| 1435 list->AddProvider(automation); | 1431 list->AddProvider(automation); |
| 1436 | 1432 |
| 1437 return true; | 1433 return true; |
| 1438 } | 1434 } |
| OLD | NEW |