| 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..6f240a853e8c6a85cbef435dc2bc82c158cc62e4 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,16 @@
|
| namespace {
|
|
|
| bool GetTemporaryConfigFilePath(std::string* path) {
|
| - NSString* filename = NSTemporaryDirectory();
|
| - if (filename == nil)
|
| + base::FilePath ret;
|
| +
|
| + if (!base::GetTempDir(&ret)) {
|
| return false;
|
| + }
|
| +
|
| + ret = ret.Append(remoting::kHostConfigFileName);
|
|
|
| - *path = [[NSString stringWithFormat:@"%@/%s",
|
| - filename, remoting::kHostConfigFileName] UTF8String];
|
| + // This should be safe on OS X because utf8 is always supported.
|
| + *path = ret.AsUTF8Unsafe();
|
| return true;
|
| }
|
|
|
|
|