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

Unified Diff: chrome/browser/chromeos/drive/drive_prefetcher.h

Issue 11360027: drive: prefetcher compares last modified time in addition to last access time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | chrome/browser/chromeos/drive/drive_prefetcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/drive_prefetcher.h
diff --git a/chrome/browser/chromeos/drive/drive_prefetcher.h b/chrome/browser/chromeos/drive/drive_prefetcher.h
index 18365e2427593ea1c6947458c2ba339e71b1b710..8fe0b7ca2c48cd1301cff1d4b8d908c7ef04468b 100644
--- a/chrome/browser/chromeos/drive/drive_prefetcher.h
+++ b/chrome/browser/chromeos/drive/drive_prefetcher.h
@@ -12,6 +12,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "chrome/browser/chromeos/drive/drive.pb.h"
#include "chrome/browser/chromeos/drive/drive_file_system_interface.h"
#include "chrome/browser/chromeos/drive/drive_file_system_observer.h"
#include "chrome/browser/chromeos/drive/drive_sync_client_observer.h"
@@ -21,7 +22,6 @@ class FilePath;
namespace drive {
-class DriveEntryProto;
class DriveFileSystemInterface;
// The parameters for DrivePrefetcher construction.
@@ -79,7 +79,9 @@ class DrivePrefetcher : public DriveFileSystemObserver,
void OnReadDirectoryFinished();
// Keeps the kNumberOfLatestFilesToKeepInCache latest files in the filesystem.
- typedef std::set<std::pair<int64, std::string> > LatestFileSet;
+ typedef bool (*PrefetchPriorityComparator)(const DriveEntryProto&,
+ const DriveEntryProto&);
+ typedef std::set<DriveEntryProto, PrefetchPriorityComparator> LatestFileSet;
LatestFileSet latest_files_;
// The queue of files to fetch. Files with higher priority comes front.
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_prefetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698