Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_STALE_CACHE_FILE_REMOVER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_STALE_CACHE_FILE_REMOVER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/basictypes.h" | |
| 12 #include "chrome/browser/chromeos/gdata/gdata_file_system_interface.h" | |
| 13 | |
| 14 namespace gdata{ | |
| 15 | |
| 16 class GDataCache; | |
| 17 class GDataFileSystem; | |
| 18 | |
| 19 // 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.
| |
| 20 // longer used. Such files are happened when the file has been deleted on the | |
| 21 // other client. | |
| 22 class StaleCacheFilesRemover { | |
| 23 public: | |
| 24 StaleCacheFilesRemover(GDataFileSystemInterface* file_system, | |
| 25 GDataCache* cache); | |
| 26 virtual ~StaleCacheFilesRemover(); | |
| 27 | |
| 28 // 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.
| |
| 29 // 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.
| |
| 30 // after this method is called. | |
| 31 void Start(); | |
| 32 | |
| 33 private: | |
| 34 void RemoveSlateCacheFiles(); | |
|
satorux1
2012/08/14 17:19:37
stale
yoshiki
2012/08/16 07:39:56
Done.
| |
| 35 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.
| |
| 36 | |
| 37 GDataFileSystemInterface* file_system_; | |
|
satorux1
2012/08/14 17:19:37
GDataFileSystemInterface* file_system_; // Not ow
yoshiki
2012/08/16 07:39:56
Done.
| |
| 38 GDataCache* cache_; | |
|
satorux1
2012/08/14 17:19:37
ditto.
yoshiki
2012/08/16 07:39:56
Done.
| |
| 39 | |
| 40 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.
| |
| 41 DISALLOW_COPY_AND_ASSIGN(StaleCacheFilesRemover); | |
| 42 }; | |
| 43 | |
| 44 } // namespace gdata | |
| 45 | |
| 46 #endif // CHROME_BROWSER_CHROMEOS_GDATA_STALE_CACHE_FILE_REMOVER_H_ | |
| OLD | NEW |