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

Side by Side Diff: content/common/sandbox_mac.mm

Issue 456513002: Add base:: qualification to some CommandLine references in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: imerge Created 6 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
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 "content/common/sandbox_mac.h" 5 #include "content/common/sandbox_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include <CoreFoundation/CFTimeZone.h> 9 #include <CoreFoundation/CFTimeZone.h>
10 extern "C" { 10 extern "C" {
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 sandbox_data = [sandbox_data 519 sandbox_data = [sandbox_data
520 stringByReplacingOccurrencesOfString:@";ENABLE_DIRECTORY_ACCESS" 520 stringByReplacingOccurrencesOfString:@";ENABLE_DIRECTORY_ACCESS"
521 withString:allowed_dir_sandbox_command]; 521 withString:allowed_dir_sandbox_command];
522 } 522 }
523 } 523 }
524 524
525 NSMutableArray* tokens_to_remove = [NSMutableArray array]; 525 NSMutableArray* tokens_to_remove = [NSMutableArray array];
526 526
527 // Enable verbose logging if enabled on the command line. (See common.sb 527 // Enable verbose logging if enabled on the command line. (See common.sb
528 // for details). 528 // for details).
529 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 529 const base::CommandLine* command_line =
530 base::CommandLine::ForCurrentProcess();
530 bool enable_logging = 531 bool enable_logging =
531 command_line->HasSwitch(switches::kEnableSandboxLogging);; 532 command_line->HasSwitch(switches::kEnableSandboxLogging);;
532 if (enable_logging) { 533 if (enable_logging) {
533 [tokens_to_remove addObject:@";ENABLE_LOGGING"]; 534 [tokens_to_remove addObject:@";ENABLE_LOGGING"];
534 } 535 }
535 536
536 bool lion_or_later = base::mac::IsOSLionOrLater(); 537 bool lion_or_later = base::mac::IsOSLionOrLater();
537 538
538 // Without this, the sandbox will print a message to the system log every 539 // Without this, the sandbox will print a message to the system log every
539 // time it denies a request. This floods the console with useless spew. 540 // time it denies a request. This floods the console with useless spew.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) { 615 if (HANDLE_EINTR(fcntl(fd.get(), F_GETPATH, canonical_path)) != 0) {
615 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " 616 DPLOG(FATAL) << "GetCanonicalSandboxPath() failed for: "
616 << path.value(); 617 << path.value();
617 return path; 618 return path;
618 } 619 }
619 620
620 return base::FilePath(canonical_path); 621 return base::FilePath(canonical_path);
621 } 622 }
622 623
623 } // namespace content 624 } // namespace content
OLDNEW
« no previous file with comments | « content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc ('k') | content/common/sandbox_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698