Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: chrome/browser/ui/startup/bad_flags_prompt.cc

Issue 1072933006: Support whitelisting to handle insecure origins as trustworthy origins (chromium) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added test, added IsOriginSecure plumbing etc Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Speech dispatcher is buggy, it can crash and it can make Chrome freeze. 73 // Speech dispatcher is buggy, it can crash and it can make Chrome freeze.
74 // http://crbug.com/327295 74 // http://crbug.com/327295
75 switches::kEnableSpeechDispatcher, 75 switches::kEnableSpeechDispatcher,
76 #endif 76 #endif
77 77
78 // These flags control Blink feature state, which is not supported and is 78 // These flags control Blink feature state, which is not supported and is
79 // intended only for use by Chromium developers. 79 // intended only for use by Chromium developers.
80 switches::kDisableBlinkFeatures, 80 switches::kDisableBlinkFeatures,
81 switches::kEnableBlinkFeatures, 81 switches::kEnableBlinkFeatures,
82 82
83 // This flag adds whitelisting to disable the Secure Origin handling.
palmer 2015/04/20 22:16:17 Nit: to whitelist an exception or 2 is not quite t
kinuko 2015/04/21 16:15:48 Done.
84 switches::kUnsafetyTreatInsecureOriginAsSecure,
85
83 NULL 86 NULL
84 }; 87 };
85 88
86 for (const char** flag = kBadFlags; *flag; ++flag) { 89 for (const char** flag = kBadFlags; *flag; ++flag) {
87 if (base::CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { 90 if (base::CommandLine::ForCurrentProcess()->HasSwitch(*flag)) {
88 SimpleAlertInfoBarDelegate::Create( 91 SimpleAlertInfoBarDelegate::Create(
89 InfoBarService::FromWebContents(web_contents), 92 InfoBarService::FromWebContents(web_contents),
90 infobars::InfoBarDelegate::kNoIconID, 93 infobars::InfoBarDelegate::kNoIconID,
91 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE, 94 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE,
92 base::UTF8ToUTF16( 95 base::UTF8ToUTF16(
(...skipping 30 matching lines...) Expand all
123 user_data_dir.LossyDisplayName()); 126 user_data_dir.LossyDisplayName());
124 127
125 if (cleanup_resource_bundle) 128 if (cleanup_resource_bundle)
126 ResourceBundle::CleanupSharedInstance(); 129 ResourceBundle::CleanupSharedInstance();
127 130
128 // More complex dialogs cannot be shown before the earliest calls here. 131 // More complex dialogs cannot be shown before the earliest calls here.
129 ShowMessageBox(NULL, title, message, chrome::MESSAGE_BOX_TYPE_WARNING); 132 ShowMessageBox(NULL, title, message, chrome::MESSAGE_BOX_TYPE_WARNING);
130 } 133 }
131 134
132 } // namespace chrome 135 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698