summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/mac/FileSystemMac.mm
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-18 13:36:51 +0100
committerSteve Block <steveblock@google.com>2011-05-24 15:38:28 +0100
commit2fc2651226baac27029e38c9d6ef883fa32084db (patch)
treee396d4bf89dcce6ed02071be66212495b1df1dec /Source/WebCore/platform/mac/FileSystemMac.mm
parentb3725cedeb43722b3b175aaeff70552e562d2c94 (diff)
downloadexternal_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Source/WebCore/platform/mac/FileSystemMac.mm')
-rw-r--r--Source/WebCore/platform/mac/FileSystemMac.mm25
1 files changed, 24 insertions, 1 deletions
diff --git a/Source/WebCore/platform/mac/FileSystemMac.mm b/Source/WebCore/platform/mac/FileSystemMac.mm
index 0df3c89..bbeb76a 100644
--- a/Source/WebCore/platform/mac/FileSystemMac.mm
+++ b/Source/WebCore/platform/mac/FileSystemMac.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,10 +25,12 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
#import "config.h"
#import "FileSystem.h"
#import "PlatformString.h"
+#import <wtf/RetainPtr.h>
#import <wtf/text/CString.h>
namespace WebCore {
@@ -62,4 +64,25 @@ CString openTemporaryFile(const char* prefix, PlatformFileHandle& platformFileHa
return CString(temporaryFilePath.data());
}
+bool canExcludeFromBackup()
+{
+#ifdef BUILDING_ON_TIGER
+ return false;
+#else
+ return true;
+#endif
+}
+
+bool excludeFromBackup(const String& path)
+{
+#ifdef BUILDING_ON_TIGER
+ UNUSED_PARAM(path);
+ return false;
+#else
+ // It is critical to pass FALSE for excludeByPath because excluding by path requires root privileges.
+ CSBackupSetItemExcluded(pathAsURL(path).get(), TRUE, FALSE);
+ return true;
+#endif
+}
+
} // namespace WebCore