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

Unified Diff: base/mac_util.mm

Issue 523024: [Mac] address perf regressions on bots... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac_util.mm
===================================================================
--- base/mac_util.mm (revision 35374)
+++ base/mac_util.mm (working copy)
@@ -240,6 +240,19 @@
bool SetFileBackupExclusion(const FilePath& file_path, bool exclude) {
NSString* filePath =
[NSString stringWithUTF8String:file_path.value().c_str()];
+
+ // If being asked to exclude something in a temp directory, just lie and say
+ // it was done. TimeMachine will already ignore temp directories. This keeps
+ // the temporary profiles used by unittests from being added to the exclude
+ // list. Otherwise, as the list grows the bots slow down due to
+ // reading/writes all the temporary profiles used over time.
+ if ([filePath hasPrefix:@"/tmp/"] ||
+ [filePath hasPrefix:@"/var/tmp/"] ||
+ [filePath hasPrefix:@"/private/tmp/"] ||
+ [filePath hasPrefix:@"/private/var/tmp/"]) {
+ return true;
+ }
+
NSURL* url = [NSURL fileURLWithPath:filePath];
// Note that we always set CSBackupSetItemExcluded's excludeByPath param
// to true. This prevents a problem with toggling the setting: if the file
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698