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

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

Issue 2724733002: Revert of 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
« no previous file with comments | « chrome/browser/file_select_helper_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d64b67e14b4124218eb6ddedc4bac7171f123992..cc17b670e0b73d70ee3800dbb198c69f8044a5de 100644
--- a/remoting/host/mac/me2me_preference_pane.mm
+++ b/remoting/host/mac/me2me_preference_pane.mm
@@ -17,7 +17,6 @@
#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"
@@ -34,16 +33,12 @@
namespace {
bool GetTemporaryConfigFilePath(std::string* path) {
- base::FilePath ret;
-
- if (!base::GetTempPath(&ret)) {
+ NSString* filename = NSTemporaryDirectory();
+ if (filename == nil)
return false;
- }
-
- ret = ret.Append(remoting::kHostConfigFileName);
-
- // This should be safe on OS X because utf8 is always supported.
- *path = ret.AsUTF8Unsafe();
+
+ *path = [[NSString stringWithFormat:@"%@/%s",
+ filename, remoting::kHostConfigFileName] UTF8String];
return true;
}
« no previous file with comments | « 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