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

Unified Diff: chrome/browser/history/history_database.cc

Issue 387016: For the immediate milestone, exclude History and Thumbnails from being backed... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
Index: chrome/browser/history/history_database.cc
===================================================================
--- chrome/browser/history/history_database.cc (revision 31614)
+++ chrome/browser/history/history_database.cc (working copy)
@@ -7,9 +7,11 @@
#include <algorithm>
#include <set>
#include <string>
-
#include "app/sql/transaction.h"
#include "base/file_util.h"
+#if defined(OS_MACOSX)
+#include "base/mac_util.h"
+#endif
#include "base/histogram.h"
#include "base/rand_util.h"
#include "base/string_util.h"
@@ -88,6 +90,15 @@
if (!committer.Begin())
return INIT_FAILURE;
+#if defined(OS_MACOSX)
+ // Exclude the history file and its journal from backups.
+ mac_util::SetFileBackupExclusion(history_name, true);
+ FilePath::StringType history_name_string(history_name.value());
+ history_name_string += "-journal";
+ FilePath history_journal_name(history_name_string);
+ mac_util::SetFileBackupExclusion(history_journal_name, true);
+#endif
+
// Prime the cache.
db_.Preload();

Powered by Google App Engine
This is Rietveld 408576698