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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.cc

Issue 10832241: Drive: Removes unused cache files after the initial feed fetch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding scoped_ptr<StaleCacheFilesRemover> to GDataFileSystem 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
Index: chrome/browser/chromeos/gdata/gdata_file_system.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc
index e52546500c80ed5edb44b65a8f2b3a1edc4015f1..55f7dc550dab1dc7999e4bfa12655b7f00772fbe 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/chromeos/gdata/gdata_protocol_handler.h"
#include "chrome/browser/chromeos/gdata/gdata_system_service.h"
#include "chrome/browser/chromeos/gdata/gdata_util.h"
+#include "chrome/browser/chromeos/gdata/stale_cache_files_remover.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
@@ -537,6 +538,7 @@ void GDataFileSystem::Initialize() {
cache_,
blocking_task_runner_));
feed_loader_->AddObserver(this);
+ stale_cache_files_remover_.reset(new StaleCacheFilesRemover(this, cache_));
PrefService* pref_service = profile_->GetPrefs();
hide_hosted_docs_ = pref_service->GetBoolean(prefs::kDisableGDataHostedFiles);
@@ -2839,6 +2841,9 @@ void GDataFileSystem::RunAndNotifyInitialLoadFinished(
DVLOG(1) << "RunAndNotifyInitialLoadFinished";
+ // Removes stale cache files.
+ stale_cache_file_remover_->Start();
satorux1 2012/08/14 17:19:37 I suggest you to call this here, but looking at th
yoshiki 2012/08/16 07:39:56 Done.
+
// Notify the observers that root directory has been initialized.
FOR_EACH_OBSERVER(GDataFileSystemInterface::Observer, observers_,
OnInitialLoadFinished());

Powered by Google App Engine
This is Rietveld 408576698