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

Unified Diff: remoting/host/mac/me2me_preference_pane.mm

Issue 2713293002: Allow $TMPDIR to set temporary directory on OS X. (Closed)
Patch Set: Created 3 years, 10 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: remoting/host/mac/me2me_preference_pane.mm
diff --git a/remoting/host/mac/me2me_preference_pane.mm b/remoting/host/mac/me2me_preference_pane.mm
index cc17b670e0b73d70ee3800dbb198c69f8044a5de..677ca907bb87f0f211743002e61109d0a8a66db1 100644
--- a/remoting/host/mac/me2me_preference_pane.mm
+++ b/remoting/host/mac/me2me_preference_pane.mm
@@ -17,6 +17,7 @@
#include <fstream>
#include <memory>
+#include "base/files/file_util.h"
#include "base/mac/authorization_util.h"
#include "base/mac/launchd.h"
#include "base/mac/mac_logging.h"
@@ -33,12 +34,14 @@
namespace {
bool GetTemporaryConfigFilePath(std::string* path) {
- NSString* filename = NSTemporaryDirectory();
- if (filename == nil)
+ base::FilePath ret;
+
+ if (!base::GetTempPath(&ret)) {
return false;
+ }
- *path = [[NSString stringWithFormat:@"%@/%s",
- filename, remoting::kHostConfigFileName] UTF8String];
+ ret.Append(remoting::kHostConfigFileName);
+ *path = ret;
return true;
}
« chrome/browser/file_select_helper_mac.mm ('K') | « chrome/browser/file_select_helper_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698