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

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

Issue 10828083: gdata: Add GDataDirectoryService::AddEntryToDirectory() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 5 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.h
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.h b/chrome/browser/chromeos/gdata/gdata_file_system.h
index 9edd41ad29aa8d1a7dc1908140cd5e51ad5ada08..e9fa58408b03405619b8b81382e038d4c021b78d 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.h
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.h
@@ -536,6 +536,27 @@ class GDataFileSystem : public GDataFileSystemInterface,
int feed_changestamp,
FileResourceIdMap* file_map);
+ // Helper function for adding new |file| from the feed into |directory|. It
+ // checks the type of file and updates |changed_dirs| if this file adding
+ // operation needs to raise directory notification update. If file is being
+ // added to |orphaned_dir_service| such notifications are not raised since
+ // we ignore such files and don't add them to the file system now.
+ // static
+ static void AddEntryToDirectoryAndCollectChangedDirectories(
+ GDataEntry* entry,
+ GDataDirectory* directory,
+ GDataDirectoryService* orphaned_dir_service,
+ std::set<FilePath>* changed_dirs);
+
+ // Helper function for removing |entry| from |directory|. If |entry| is a
+ // directory too, it will collect all its children file paths into
+ // |changed_dirs| as well.
+ // static
+ static void RemoveEntryFromDirectoryAndCollectChangedDirectories(
+ GDataDirectory* directory,
+ GDataEntry* entry,
+ std::set<FilePath>* changed_dirs);
+
// Finds directory where new |file| should be added to during feed processing.
// |orphaned_entries_dir| collects files/dirs that don't have a parent in
// either locally cached file system or in this new feed.
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_db_unittest.cc ('k') | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698