Chromium Code Reviews| 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..ed8d2df3455eb357139b5fccec923adc2292a7d2 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/gdata/stale_cache_files_remover.h |
| @@ -0,0 +1,46 @@ |
| +// 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; |
| + |
| +// This class removes slace cache files, which are existed as file but are no |
|
satorux1
2012/08/14 17:19:37
maybe
// This class removes stale cache files, w
yoshiki
2012/08/16 07:39:56
Done.
|
| +// longer used. Such files are happened when the file has been deleted on the |
| +// other client. |
| +class StaleCacheFilesRemover { |
| + public: |
| + StaleCacheFilesRemover(GDataFileSystemInterface* file_system, |
| + GDataCache* cache); |
| + virtual ~StaleCacheFilesRemover(); |
| + |
| + // Removes slate cache files. The execution is delayed so the actual removal |
|
satorux1
2012/08/14 17:19:37
stale
yoshiki
2012/08/16 07:39:56
Done.
|
| + // starts several (|kDelaySeconds| in slate_cache_file_remover.cc) seconds |
|
satorux1
2012/08/14 17:19:37
Let's remove the delay. I think it's simpler not t
yoshiki
2012/08/16 07:39:56
Done.
|
| + // after this method is called. |
| + void Start(); |
| + |
| + private: |
| + void RemoveSlateCacheFiles(); |
|
satorux1
2012/08/14 17:19:37
stale
yoshiki
2012/08/16 07:39:56
Done.
|
| + void OnGetResourceIdsOfAllFiles(const std::vector<std::string>& resource_ids); |
|
satorux1
2012/08/14 17:19:37
function comments missing.
yoshiki
2012/08/16 07:39:56
Done.
|
| + |
| + GDataFileSystemInterface* file_system_; |
|
satorux1
2012/08/14 17:19:37
GDataFileSystemInterface* file_system_; // Not ow
yoshiki
2012/08/16 07:39:56
Done.
|
| + GDataCache* cache_; |
|
satorux1
2012/08/14 17:19:37
ditto.
yoshiki
2012/08/16 07:39:56
Done.
|
| + |
| + base::WeakPtrFactory<StaleCacheFilesRemover> weak_ptr_factory_; |
|
satorux1
2012/08/14 17:19:37
please add
// Note: This should remain the las
yoshiki
2012/08/16 07:39:56
Done.
|
| + DISALLOW_COPY_AND_ASSIGN(StaleCacheFilesRemover); |
| +}; |
| + |
| +} // namespace gdata |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_GDATA_STALE_CACHE_FILE_REMOVER_H_ |