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

Unified Diff: runtime/bin/directory_impl.dart

Issue 8879058: Change temp dir generation on Windows to use UUIDs instead of random numbers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/directory.cc ('k') | runtime/bin/directory_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/directory_impl.dart
diff --git a/runtime/bin/directory_impl.dart b/runtime/bin/directory_impl.dart
index 299e8141acf94be6dde463b4ff3b5c18b7c30492..19c2a0a0f13066214256dea50d2ac687a4426018 100644
--- a/runtime/bin/directory_impl.dart
+++ b/runtime/bin/directory_impl.dart
@@ -44,9 +44,7 @@ class _DirectoryCreateTempIsolate extends Isolate {
port.receive((path, replyTo) {
// Call function to get file name
var status = new _OSStatus();
- var result = _Directory._createTemp(path,
- (Math.random() * 0x8000000).toInt(),
- status);
+ var result = _Directory._createTemp(path, status);
if (result == null) {
replyTo.send(status);
} else {
@@ -63,7 +61,6 @@ class _Directory implements Directory {
_Directory(String this._path);
static String _createTemp(String template,
- int num,
_OSStatus status) native "Directory_CreateTemp";
bool existsSync() {
@@ -100,7 +97,7 @@ class _Directory implements Directory {
void createTempSync() {
var status = new _OSStatus();
- var result = _createTemp(path, (Math.random() * 0x8000000).toInt(), status);
+ var result = _createTemp(path, status);
if (result != null) {
_path = result;
} else {
« no previous file with comments | « runtime/bin/directory.cc ('k') | runtime/bin/directory_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698