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

Unified Diff: chrome/browser/chromeos/gdata/stale_cache_files_remover.h

Issue 10832241: Drive: Removes unused cache files after the initial feed fetch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix (#2) 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/stale_cache_files_remover.h
diff --git a/chrome/browser/chromeos/gdata/stale_cache_files_remover.h b/chrome/browser/chromeos/gdata/stale_cache_files_remover.h
new file mode 100644
index 0000000000000000000000000000000000000000..3aa6f929a49d17f2a7e69c5ca1648bc0f8873085
--- /dev/null
+++ b/chrome/browser/chromeos/gdata/stale_cache_files_remover.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_GDATA_STALE_CACHE_FILE_REMOVER_H_
+#define CHROME_BROWSER_CHROMEOS_GDATA_STALE_CACHE_FILE_REMOVER_H_
+
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h"
+
+namespace gdata{
+
+class GDataCache;
+class GDataFileSystem;
+
+class StaleCacheFilesRemover {
satorux1 2012/08/10 23:47:40 class comment is missing.
+ public:
+ StaleCacheFilesRemover(GDataFileSystemInterface* file_system,
+ GDataCache* cache);
+ virtual ~StaleCacheFilesRemover();
+
+ void ScrubCacheAfterDelay();
satorux1 2012/08/10 23:47:40 function comment is missing. Please fix other plac
+
+ private:
+ void ScrubCache();
+ void OnGetResourceIdsOfAllFiles(const std::vector<std::string>& resource_ids);
+
+ GDataFileSystemInterface* file_system_;
+ GDataCache* cache_;
+
+ base::WeakPtrFactory<StaleCacheFilesRemover> weak_ptr_factory_;
+ DISALLOW_COPY_AND_ASSIGN(StaleCacheFilesRemover);
+};
+
+} // namespace gdata
+
+#endif // CHROME_BROWSER_CHROMEOS_GDATA_STALE_CACHE_FILE_REMOVER_H_

Powered by Google App Engine
This is Rietveld 408576698