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

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

Issue 14180010: Translate: browser test for Chrome Translate in an isolated world (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix two memory bugs Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/translate/translate_browsertest.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/infobars/infobar_service.h" 9 #include "chrome/browser/infobars/infobar_service.h"
10 #include "chrome/browser/infobars/simple_alert_infobar_delegate.h" 10 #include "chrome/browser/infobars/simple_alert_infobar_delegate.h"
(...skipping 18 matching lines...) Expand all
29 // These imply disabling the sandbox. 29 // These imply disabling the sandbox.
30 switches::kSingleProcess, 30 switches::kSingleProcess,
31 switches::kNoSandbox, 31 switches::kNoSandbox,
32 switches::kDisableWebSecurity, 32 switches::kDisableWebSecurity,
33 // Browser plugin is dangerous on regular pages because it breaks the Same 33 // Browser plugin is dangerous on regular pages because it breaks the Same
34 // Origin Policy. 34 // Origin Policy.
35 switches::kEnableBrowserPluginForAllViewTypes, 35 switches::kEnableBrowserPluginForAllViewTypes,
36 extensions::switches::kExtensionsOnChromeURLs, 36 extensions::switches::kExtensionsOnChromeURLs,
37 // This parameter should be used only for server side developments. 37 // This parameter should be used only for server side developments.
38 switches::kTranslateScriptURL, 38 switches::kTranslateScriptURL,
39 switches::kTranslateSecurityOrigin,
39 NULL 40 NULL
40 }; 41 };
41 42
42 for (const char** flag = kBadFlags; *flag; ++flag) { 43 for (const char** flag = kBadFlags; *flag; ++flag) {
43 if (CommandLine::ForCurrentProcess()->HasSwitch(*flag)) { 44 if (CommandLine::ForCurrentProcess()->HasSwitch(*flag)) {
44 SimpleAlertInfoBarDelegate::Create( 45 SimpleAlertInfoBarDelegate::Create(
45 InfoBarService::FromWebContents(web_contents), 46 InfoBarService::FromWebContents(web_contents),
46 InfoBarDelegate::kNoIconID, 47 InfoBarDelegate::kNoIconID,
47 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE, 48 l10n_util::GetStringFUTF16(IDS_BAD_FLAGS_WARNING_MESSAGE,
48 UTF8ToUTF16(std::string("--") + *flag)), 49 UTF8ToUTF16(std::string("--") + *flag)),
49 false); 50 false);
50 return; 51 return;
51 } 52 }
52 } 53 }
53 } 54 }
54 55
55 } // namespace chrome 56 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_browsertest.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698