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

Unified Diff: chrome/browser/history/thumbnail_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
« base/mac_util.mm ('K') | « chrome/browser/history/history_database.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/thumbnail_database.cc
===================================================================
--- chrome/browser/history/thumbnail_database.cc (revision 31614)
+++ chrome/browser/history/thumbnail_database.cc (working copy)
@@ -8,6 +8,9 @@
#include "app/sql/statement.h"
#include "app/sql/transaction.h"
#include "base/file_util.h"
+#if defined(OS_MACOSX)
+#include "base/mac_util.h"
+#endif
#include "base/time.h"
#include "base/string_util.h"
#include "chrome/browser/diagnostics/sqlite_diagnostics.h"
@@ -63,6 +66,15 @@
sql::Transaction transaction(&db_);
transaction.Begin();
+#if defined(OS_MACOSX)
+ // Exclude the thumbnails file and its journal from backups.
+ mac_util::SetFileBackupExclusion(db_name, true);
+ FilePath::StringType db_name_string(db_name.value());
+ db_name_string += "-journal";
+ FilePath db_journal_name(db_name_string);
+ mac_util::SetFileBackupExclusion(db_journal_name, true);
+#endif
+
// Create the tables.
if (!meta_table_.Init(&db_, kCurrentVersionNumber,
kCompatibleVersionNumber) ||
« base/mac_util.mm ('K') | « chrome/browser/history/history_database.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698