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

Unified Diff: runtime/bin/directory.cc

Issue 2156243002: Fix DevFS on Android devices (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: runtime/bin/directory.cc
diff --git a/runtime/bin/directory.cc b/runtime/bin/directory.cc
index a9b2331e5bd0bec12017e40836e426cd0ada1cc5..ccf5918f352c8dedf271e30446cd74e45213809a 100644
--- a/runtime/bin/directory.cc
+++ b/runtime/bin/directory.cc
@@ -14,6 +14,8 @@
namespace dart {
namespace bin {
+char* Directory::system_temp_path_override_ = NULL;
+
void FUNCTION_NAME(Directory_Current)(Dart_NativeArguments args) {
const char* current = Directory::Current();
if (current != NULL) {
@@ -187,6 +189,17 @@ void FUNCTION_NAME(Directory_SetAsyncDirectoryListerPointer)(
}
+void Directory::SetSystemTemp(const char* path) {
+ if (system_temp_path_override_ != NULL) {
+ free(system_temp_path_override_);
+ system_temp_path_override_ = NULL;
+ }
+ if (path != NULL) {
+ system_temp_path_override_ = strdup(path);
+ }
+}
+
+
CObject* Directory::CreateRequest(const CObjectArray& request) {
if ((request.Length() == 1) && request[0]->IsString()) {
CObjectString path(request[0]);

Powered by Google App Engine
This is Rietveld 408576698