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

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

Issue 2517953003: Move enable_webrtc to a buildflag header. (Closed)
Patch Set: Fix Created 4 years 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 "build/build_config.h" 10 #include "build/build_config.h"
11 #include "chrome/browser/infobars/infobar_service.h" 11 #include "chrome/browser/infobars/infobar_service.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/simple_message_box.h" 13 #include "chrome/browser/ui/simple_message_box.h"
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" 14 #include "chrome/browser/ui/tabs/tab_strip_model.h"
15 #include "chrome/common/chrome_paths.h" 15 #include "chrome/common/chrome_paths.h"
16 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
17 #include "chrome/common/switch_utils.h" 17 #include "chrome/common/switch_utils.h"
18 #include "chrome/grit/chromium_strings.h" 18 #include "chrome/grit/chromium_strings.h"
19 #include "chrome/grit/generated_resources.h" 19 #include "chrome/grit/generated_resources.h"
20 #include "components/autofill/core/common/autofill_switches.h" 20 #include "components/autofill/core/common/autofill_switches.h"
21 #include "components/infobars/core/infobar_delegate.h" 21 #include "components/infobars/core/infobar_delegate.h"
22 #include "components/infobars/core/simple_alert_infobar_delegate.h" 22 #include "components/infobars/core/simple_alert_infobar_delegate.h"
23 #include "components/invalidation/impl/invalidation_switches.h" 23 #include "components/invalidation/impl/invalidation_switches.h"
24 #include "components/nacl/common/nacl_switches.h" 24 #include "components/nacl/common/nacl_switches.h"
25 #include "components/startup_metric_utils/browser/startup_metric_utils.h" 25 #include "components/startup_metric_utils/browser/startup_metric_utils.h"
26 #include "components/translate/core/common/translate_switches.h" 26 #include "components/translate/core/common/translate_switches.h"
27 #include "content/public/common/content_switches.h" 27 #include "content/public/common/content_switches.h"
28 #include "extensions/common/switches.h" 28 #include "extensions/common/switches.h"
29 #include "google_apis/gaia/gaia_switches.h" 29 #include "google_apis/gaia/gaia_switches.h"
30 #include "media/media_features.h"
30 #include "ui/base/l10n/l10n_util.h" 31 #include "ui/base/l10n/l10n_util.h"
31 #include "ui/base/resource/resource_bundle.h" 32 #include "ui/base/resource/resource_bundle.h"
32 #include "ui/gfx/vector_icons_public.h" 33 #include "ui/gfx/vector_icons_public.h"
33 34
34 namespace chrome { 35 namespace chrome {
35 36
36 void ShowBadFlagsPrompt(Browser* browser) { 37 void ShowBadFlagsPrompt(Browser* browser) {
37 content::WebContents* web_contents = 38 content::WebContents* web_contents =
38 browser->tab_strip_model()->GetActiveWebContents(); 39 browser->tab_strip_model()->GetActiveWebContents();
39 if (!web_contents) 40 if (!web_contents)
(...skipping 10 matching lines...) Expand all
50 #if !defined(DISABLE_NACL) 51 #if !defined(DISABLE_NACL)
51 switches::kNaClDangerousNoSandboxNonSfi, 52 switches::kNaClDangerousNoSandboxNonSfi,
52 #endif 53 #endif
53 switches::kNoSandbox, 54 switches::kNoSandbox,
54 switches::kSingleProcess, 55 switches::kSingleProcess,
55 56
56 // These flags disable or undermine the Same Origin Policy. 57 // These flags disable or undermine the Same Origin Policy.
57 translate::switches::kTranslateSecurityOrigin, 58 translate::switches::kTranslateSecurityOrigin,
58 59
59 // These flags undermine HTTPS / connection security. 60 // These flags undermine HTTPS / connection security.
60 #if defined(ENABLE_WEBRTC) 61 #if BUILDFLAG(ENABLE_WEBRTC)
61 switches::kDisableWebRtcEncryption, 62 switches::kDisableWebRtcEncryption,
62 #endif 63 #endif
63 switches::kIgnoreCertificateErrors, 64 switches::kIgnoreCertificateErrors,
64 switches::kReduceSecurityForTesting, 65 switches::kReduceSecurityForTesting,
65 invalidation::switches::kSyncAllowInsecureXmppConnection, 66 invalidation::switches::kSyncAllowInsecureXmppConnection,
66 67
67 // These flags change the URLs that handle PII. 68 // These flags change the URLs that handle PII.
68 switches::kGaiaUrl, 69 switches::kGaiaUrl,
69 translate::switches::kTranslateScriptURL, 70 translate::switches::kTranslateScriptURL,
70 71
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 user_data_dir.LossyDisplayName()); 138 user_data_dir.LossyDisplayName());
138 139
139 if (cleanup_resource_bundle) 140 if (cleanup_resource_bundle)
140 ResourceBundle::CleanupSharedInstance(); 141 ResourceBundle::CleanupSharedInstance();
141 142
142 // More complex dialogs cannot be shown before the earliest calls here. 143 // More complex dialogs cannot be shown before the earliest calls here.
143 ShowWarningMessageBox(NULL, title, message); 144 ShowWarningMessageBox(NULL, title, message);
144 } 145 }
145 146
146 } // namespace chrome 147 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper.cc ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698