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 "chrome/browser/ui/startup/bad_flags_prompt.h" | 5 #include "chrome/browser/ui/startup/bad_flags_prompt.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 // These flags control Blink feature state, which is not supported and is | 81 // These flags control Blink feature state, which is not supported and is |
82 // intended only for use by Chromium developers. | 82 // intended only for use by Chromium developers. |
83 switches::kDisableBlinkFeatures, | 83 switches::kDisableBlinkFeatures, |
84 switches::kEnableBlinkFeatures, | 84 switches::kEnableBlinkFeatures, |
85 | 85 |
86 // This flag allows people to whitelist certain origins as secure, even | 86 // This flag allows people to whitelist certain origins as secure, even |
87 // if they are not. | 87 // if they are not. |
88 switches::kUnsafelyTreatInsecureOriginAsSecure, | 88 switches::kUnsafelyTreatInsecureOriginAsSecure, |
89 | 89 |
90 // This flag disables WebUSB's CORS-like checks for origin to device | |
91 // communication, allowing any origin to ask the user for permission to | |
92 // connect to a device. It is intended for manufacturers testing their | |
93 // existing devices until https://crbug.com/598766 is implemented. | |
94 switches::kDisableWebUsbSecurity, | |
95 | |
96 NULL | 90 NULL |
97 }; | 91 }; |
98 | 92 |
99 for (const char** flag = kBadFlags; *flag; ++flag) { | 93 for (const char** flag = kBadFlags; *flag; ++flag) { |
100 if (base::CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { | 94 if (base::CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { |
101 SimpleAlertInfoBarDelegate::Create( | 95 SimpleAlertInfoBarDelegate::Create( |
102 InfoBarService::FromWebContents(web_contents), | 96 InfoBarService::FromWebContents(web_contents), |
103 infobars::InfoBarDelegate::BAD_FLAGS_PROMPT, | 97 infobars::InfoBarDelegate::BAD_FLAGS_PROMPT, |
104 infobars::InfoBarDelegate::kNoIconID, | 98 infobars::InfoBarDelegate::kNoIconID, |
105 gfx::VectorIconId::VECTOR_ICON_NONE, | 99 gfx::VectorIconId::VECTOR_ICON_NONE, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 user_data_dir.LossyDisplayName()); | 132 user_data_dir.LossyDisplayName()); |
139 | 133 |
140 if (cleanup_resource_bundle) | 134 if (cleanup_resource_bundle) |
141 ResourceBundle::CleanupSharedInstance(); | 135 ResourceBundle::CleanupSharedInstance(); |
142 | 136 |
143 // More complex dialogs cannot be shown before the earliest calls here. | 137 // More complex dialogs cannot be shown before the earliest calls here. |
144 ShowWarningMessageBox(NULL, title, message); | 138 ShowWarningMessageBox(NULL, title, message); |
145 } | 139 } |
146 | 140 |
147 } // namespace chrome | 141 } // namespace chrome |
OLD | NEW |