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

Side by Side Diff: runtime/bin/directory.h

Issue 9568010: Use a pool of native ports for directory operations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/directory.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_DIRECTORY_H_ 5 #ifndef BIN_DIRECTORY_H_
6 #define BIN_DIRECTORY_H_ 6 #define BIN_DIRECTORY_H_
7 7
8 #include "bin/builtin.h" 8 #include "bin/builtin.h"
9 #include "bin/dartutils.h" 9 #include "bin/dartutils.h"
10 #include "platform/globals.h" 10 #include "platform/globals.h"
11 #include "platform/thread.h"
11 12
12 class DirectoryListing { 13 class DirectoryListing {
13 public: 14 public:
14 enum Response { 15 enum Response {
15 kListDirectory = 0, 16 kListDirectory = 0,
16 kListFile = 1, 17 kListFile = 1,
17 kListError = 2, 18 kListError = 2,
18 kListDone = 3 19 kListDone = 3
19 }; 20 };
20 21
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 57
57 static bool Create(const char* path); 58 static bool Create(const char* path);
58 59
59 static int CreateTemp(const char* const_template, 60 static int CreateTemp(const char* const_template,
60 char** path, 61 char** path,
61 char* os_error_message, 62 char* os_error_message,
62 int os_error_message_len); 63 int os_error_message_len);
63 64
64 static bool Delete(const char* path, bool recursive); 65 static bool Delete(const char* path, bool recursive);
65 66
67 static Dart_Port GetServicePort();
68
69 private:
70 static dart::Mutex mutex_;
71 static int service_ports_size_;
72 static Dart_Port* service_ports_;
73 static int service_ports_index_;
74
66 DISALLOW_ALLOCATION(); 75 DISALLOW_ALLOCATION();
67 DISALLOW_IMPLICIT_CONSTRUCTORS(Directory); 76 DISALLOW_IMPLICIT_CONSTRUCTORS(Directory);
68 }; 77 };
69 78
70 79
71 #endif // BIN_DIRECTORY_H_ 80 #endif // BIN_DIRECTORY_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/directory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698