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

Unified Diff: sync/syncable/on_disk_directory_backing_store.cc

Issue 10827212: Fix mem leak in DirectoryBackingStore unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rewrite fix Created 8 years, 4 months 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: sync/syncable/on_disk_directory_backing_store.cc
diff --git a/sync/syncable/on_disk_directory_backing_store.cc b/sync/syncable/on_disk_directory_backing_store.cc
index f844f38c4293d2552143b94d1aeba619a582f96f..1c20b2e082125b2e59ae6459ad8ef7fe863747d8 100644
--- a/sync/syncable/on_disk_directory_backing_store.cc
+++ b/sync/syncable/on_disk_directory_backing_store.cc
@@ -5,6 +5,7 @@
#include "sync/syncable/on_disk_directory_backing_store.h"
#include "base/logging.h"
+#include "base/stl_util.h"
#include "base/metrics/histogram.h"
#include "sync/syncable/syncable-inl.h"
@@ -72,7 +73,7 @@ DirOpenResult OnDiskDirectoryBackingStore::Load(
// The fallback: delete the current database and return a fresh one. We can
// fetch the user's data from the could.
- entry_bucket->clear();
+ STLDeleteElements(entry_bucket);
db_.reset(new sql::Connection);
file_util::Delete(backing_filepath_, false);
« 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