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

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

Issue 4974001: base: Get rid of 'using' declaration of StringAppendF. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/common/sandbox_mac.h" 5 #include "chrome/common/sandbox_mac.h"
6 6
7 #include "base/debug_util.h" 7 #include "base/debug_util.h"
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 extern "C" { 10 extern "C" {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 if (c < 128) { // EscapeSingleChar only handles ASCII. 87 if (c < 128) { // EscapeSingleChar only handles ASCII.
88 char as_char = static_cast<char>(c); 88 char as_char = static_cast<char>(c);
89 if (EscapeSingleChar(as_char, dst)) { 89 if (EscapeSingleChar(as_char, dst)) {
90 continue; 90 continue;
91 } 91 }
92 } 92 }
93 93
94 if (c < 32 || c > 126) { 94 if (c < 32 || c > 126) {
95 // Any characters that aren't printable ASCII get the \u treatment. 95 // Any characters that aren't printable ASCII get the \u treatment.
96 unsigned int as_uint = static_cast<unsigned int>(c); 96 unsigned int as_uint = static_cast<unsigned int>(c);
97 StringAppendF(dst, "\\u%04X", as_uint); 97 base::StringAppendF(dst, "\\u%04X", as_uint);
98 continue; 98 continue;
99 } 99 }
100 100
101 // If we got here we know that the character in question is strictly 101 // If we got here we know that the character in question is strictly
102 // in the ASCII range so there's no need to do any kind of encoding 102 // in the ASCII range so there's no need to do any kind of encoding
103 // conversion. 103 // conversion.
104 dst->push_back(static_cast<char>(c)); 104 dst->push_back(static_cast<char>(c));
105 } 105 }
106 return true; 106 return true;
107 } 107 }
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 if (HANDLE_EINTR(fcntl(fd, F_GETPATH, canonical_path)) != 0) { 538 if (HANDLE_EINTR(fcntl(fd, F_GETPATH, canonical_path)) != 0) {
539 PLOG(FATAL) << "GetCanonicalSandboxPath() failed for: " 539 PLOG(FATAL) << "GetCanonicalSandboxPath() failed for: "
540 << path->value(); 540 << path->value();
541 return; 541 return;
542 } 542 }
543 543
544 *path = FilePath(canonical_path); 544 *path = FilePath(canonical_path);
545 } 545 }
546 546
547 } // namespace sandbox 547 } // namespace sandbox
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/select_file_dialog.cc ('k') | chrome/service/cloud_print/cloud_print_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698