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

Side by Side Diff: chrome/browser/ui/browser_init.cc

Issue 10298012: [protector] Disable the UI by default, flip --no-protector to --protector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/protector/protector_utils.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/browser_init.h" 5 #include "chrome/browser/ui/browser_init.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 1339
1340 void BrowserInit::LaunchWithProfile::AddBadFlagsInfoBarIfNecessary( 1340 void BrowserInit::LaunchWithProfile::AddBadFlagsInfoBarIfNecessary(
1341 TabContentsWrapper* tab) { 1341 TabContentsWrapper* tab) {
1342 // Unsupported flags for which to display a warning that "stability and 1342 // Unsupported flags for which to display a warning that "stability and
1343 // security will suffer". 1343 // security will suffer".
1344 static const char* kBadFlags[] = { 1344 static const char* kBadFlags[] = {
1345 // These imply disabling the sandbox. 1345 // These imply disabling the sandbox.
1346 switches::kSingleProcess, 1346 switches::kSingleProcess,
1347 switches::kNoSandbox, 1347 switches::kNoSandbox,
1348 switches::kInProcessWebGL, 1348 switches::kInProcessWebGL,
1349 // This should only be used for tests and to disable Protector on ChromeOS.
1350 #if !defined(OS_CHROMEOS)
1351 switches::kNoProtector,
1352 #endif
1353 NULL 1349 NULL
1354 }; 1350 };
1355 1351
1356 const char* bad_flag = NULL; 1352 const char* bad_flag = NULL;
1357 for (const char** flag = kBadFlags; *flag; ++flag) { 1353 for (const char** flag = kBadFlags; *flag; ++flag) {
1358 if (command_line_.HasSwitch(*flag)) { 1354 if (command_line_.HasSwitch(*flag)) {
1359 bad_flag = *flag; 1355 bad_flag = *flag;
1360 break; 1356 break;
1361 } 1357 }
1362 } 1358 }
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 1929
1934 Profile* profile = ProfileManager::GetLastUsedProfile(); 1930 Profile* profile = ProfileManager::GetLastUsedProfile();
1935 if (!profile) { 1931 if (!profile) {
1936 // We should only be able to get here if the profile already exists and 1932 // We should only be able to get here if the profile already exists and
1937 // has been created. 1933 // has been created.
1938 NOTREACHED(); 1934 NOTREACHED();
1939 return; 1935 return;
1940 } 1936 }
1941 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, Profiles(), NULL, NULL); 1937 ProcessCmdLineImpl(cmd_line, cur_dir, false, profile, Profiles(), NULL, NULL);
1942 } 1938 }
OLDNEW
« no previous file with comments | « chrome/browser/protector/protector_utils.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698