summaryrefslogtreecommitdiff
path: root/base/files
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2017-12-20 18:26:31 +0000
committerMyles Watson <mylesgw@google.com>2017-12-20 18:47:15 +0000
commit70cd4fac31a9b0865dab6574540f70cc103337dc (patch)
treea9d13e0b40d89d8960e80b71a7c21e639ea6c2d5 /base/files
parentbf8c17f71511c1e90cd8cccfe71f0852c566bd3b (diff)
downloadlibchrome-70cd4fac31a9b0865dab6574540f70cc103337dc.tar.gz
Revert "Uprev the library to r462023 from Chromium"
This reverts commit bf8c17f71511c1e90cd8cccfe71f0852c566bd3b. Reason for revert: https://buganizer.corp.google.com/issues/70858501 Change-Id: Iedb1193d46ea2211f8b6fdace41902ad8df6d754
Diffstat (limited to 'base/files')
-rw-r--r--base/files/file_path.cc2
-rw-r--r--base/files/file_path.h2
-rw-r--r--base/files/file_util_mac.mm12
3 files changed, 5 insertions, 11 deletions
diff --git a/base/files/file_path.cc b/base/files/file_path.cc
index 21df995094..9f67f9bc49 100644
--- a/base/files/file_path.cc
+++ b/base/files/file_path.cc
@@ -176,7 +176,7 @@ FilePath::FilePath() {
FilePath::FilePath(const FilePath& that) : path_(that.path_) {
}
-FilePath::FilePath(FilePath&& that) noexcept = default;
+FilePath::FilePath(FilePath&& that) = default;
FilePath::FilePath(StringPieceType path) {
path.CopyToString(&path_);
diff --git a/base/files/file_path.h b/base/files/file_path.h
index 0be0ad0b10..02846f6892 100644
--- a/base/files/file_path.h
+++ b/base/files/file_path.h
@@ -184,7 +184,7 @@ class BASE_EXPORT FilePath {
// Constructs FilePath with the contents of |that|, which is left in valid but
// unspecified state.
- FilePath(FilePath&& that) noexcept;
+ FilePath(FilePath&& that);
// Replaces the contents with those of |that|, which is left in valid but
// unspecified state.
FilePath& operator=(FilePath&& that);
diff --git a/base/files/file_util_mac.mm b/base/files/file_util_mac.mm
index d3e14a3787..5a99aa0e81 100644
--- a/base/files/file_util_mac.mm
+++ b/base/files/file_util_mac.mm
@@ -7,10 +7,8 @@
#import <Foundation/Foundation.h>
#include <copyfile.h>
#include <stdlib.h>
-#include <string.h>
#include "base/files/file_path.h"
-#include "base/logging.h"
#include "base/mac/foundation_util.h"
#include "base/strings/string_util.h"
#include "base/threading/thread_restrictions.h"
@@ -26,14 +24,10 @@ bool CopyFile(const FilePath& from_path, const FilePath& to_path) {
}
bool GetTempDir(base::FilePath* path) {
- // In order to facilitate hermetic runs on macOS, first check
- // $MAC_CHROMIUM_TMPDIR. We check this instead of $TMPDIR because external
- // programs currently set $TMPDIR with no effect, but when we respect it
- // directly it can cause crashes (like crbug.com/698759).
- const char* env_tmpdir = getenv("MAC_CHROMIUM_TMPDIR");
+ // In order to facilitate hermetic runs on macOS, first check $TMPDIR.
+ // NOTE: $TMPDIR is ALMOST ALWAYS set on macOS (unless the user un-set it).
+ const char* env_tmpdir = getenv("TMPDIR");
if (env_tmpdir) {
- DCHECK_LT(strlen(env_tmpdir), 50u)
- << "too-long TMPDIR causes socket name length issues.";
*path = base::FilePath(env_tmpdir);
return true;
}