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

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

Issue 1134473003: bluetooth: Add a WebBluetooth command line flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add to flag to histogram Created 5 years, 7 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 allows people to whitelist certain origins as secure, even 83 // This flag allows people to whitelist certain origins as secure, even
84 // if they are not. 84 // if they are not.
85 switches::kUnsafelyTreatInsecureOriginAsSecure, 85 switches::kUnsafelyTreatInsecureOriginAsSecure,
86 86
87 // This flag enables Web Bluetooth. Since the UI for Web Bluetooth is
88 // not yet implemented, websites could take control over paired devices
89 // without the users knowledge, so we need to show a warning for when
90 // the flag is enabled.
91 switches::kEnableWebBluetooth,
92
87 NULL 93 NULL
88 }; 94 };
89 95
90 for (const char** flag = kBadFlags; *flag; ++flag) { 96 for (const char** flag = kBadFlags; *flag; ++flag) {
91 if (base::CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { 97 if (base::CommandLine::ForCurrentProcess()->HasSwitch(*flag)) {
92 SimpleAlertInfoBarDelegate::Create( 98 SimpleAlertInfoBarDelegate::Create(
93 InfoBarService::FromWebContents(web_contents), 99 InfoBarService::FromWebContents(web_contents),
94 infobars::InfoBarDelegate::kNoIconID, 100 infobars::InfoBarDelegate::kNoIconID,
95 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE, 101 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE,
96 base::UTF8ToUTF16( 102 base::UTF8ToUTF16(
(...skipping 30 matching lines...) Expand all
127 user_data_dir.LossyDisplayName()); 133 user_data_dir.LossyDisplayName());
128 134
129 if (cleanup_resource_bundle) 135 if (cleanup_resource_bundle)
130 ResourceBundle::CleanupSharedInstance(); 136 ResourceBundle::CleanupSharedInstance();
131 137
132 // More complex dialogs cannot be shown before the earliest calls here. 138 // More complex dialogs cannot be shown before the earliest calls here.
133 ShowMessageBox(NULL, title, message, chrome::MESSAGE_BOX_TYPE_WARNING); 139 ShowMessageBox(NULL, title, message, chrome::MESSAGE_BOX_TYPE_WARNING);
134 } 140 }
135 141
136 } // namespace chrome 142 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698