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

Side by Side Diff: src/base/platform/platform-win32.cc

Issue 960813004: Fix preparing log file name. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 5 years, 9 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
« no previous file with comments | « src/base/platform/platform-posix.cc ('k') | src/log.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project 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 // Platform-specific code for Win32. 5 // Platform-specific code for Win32.
6 6
7 // Secure API functions are not available using MinGW with msvcrt.dll 7 // Secure API functions are not available using MinGW with msvcrt.dll
8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to 8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to
9 // disable definition of secure API functions in standard headers that 9 // disable definition of secure API functions in standard headers that
10 // would conflict with our own implementation. 10 // would conflict with our own implementation.
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 return NULL; 568 return NULL;
569 } 569 }
570 } 570 }
571 571
572 572
573 bool OS::Remove(const char* path) { 573 bool OS::Remove(const char* path) {
574 return (DeleteFileA(path) != 0); 574 return (DeleteFileA(path) != 0);
575 } 575 }
576 576
577 577
578 bool OS::isDirectorySeparator(const char ch) {
579 return ch == '/' || ch == '\\';
580 }
581
582
578 FILE* OS::OpenTemporaryFile() { 583 FILE* OS::OpenTemporaryFile() {
579 // tmpfile_s tries to use the root dir, don't use it. 584 // tmpfile_s tries to use the root dir, don't use it.
580 char tempPathBuffer[MAX_PATH]; 585 char tempPathBuffer[MAX_PATH];
581 DWORD path_result = 0; 586 DWORD path_result = 0;
582 path_result = GetTempPathA(MAX_PATH, tempPathBuffer); 587 path_result = GetTempPathA(MAX_PATH, tempPathBuffer);
583 if (path_result > MAX_PATH || path_result == 0) return NULL; 588 if (path_result > MAX_PATH || path_result == 0) return NULL;
584 UINT name_result = 0; 589 UINT name_result = 0;
585 char tempNameBuffer[MAX_PATH]; 590 char tempNameBuffer[MAX_PATH];
586 name_result = GetTempFileNameA(tempPathBuffer, "", 0, tempNameBuffer); 591 name_result = GetTempFileNameA(tempPathBuffer, "", 0, tempNameBuffer);
587 if (name_result == 0) return NULL; 592 if (name_result == 0) return NULL;
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 DCHECK(result); 1381 DCHECK(result);
1377 } 1382 }
1378 1383
1379 1384
1380 1385
1381 void Thread::YieldCPU() { 1386 void Thread::YieldCPU() {
1382 Sleep(0); 1387 Sleep(0);
1383 } 1388 }
1384 1389
1385 } } // namespace v8::base 1390 } } // namespace v8::base
OLDNEW
« no previous file with comments | « src/base/platform/platform-posix.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698