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

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

Issue 10834093: gdata: Make RemoveEntry/TakeEntry/TakeOverEntries private (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.h ('k') | chrome/browser/chromeos/gdata/gdata_files.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_file_system.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc
index fb4f8844d72dec9c46d9e558270e619ca1c48d07..824fe9ca3b300450eba52c70fcc87e8111324403 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
@@ -405,20 +405,6 @@ void RunTaskOnThread(scoped_refptr<base::MessageLoopProxy> relay_proxy,
}
// Callback for GetEntryByResourceIdAsync.
-// Removes stale entry upon upload of file.
-void RemoveStaleEntryOnUpload(const std::string& resource_id,
- GDataDirectory* parent_dir,
- GDataEntry* existing_entry) {
- if (existing_entry &&
- // This should always match, but just in case.
- existing_entry->parent() == parent_dir) {
- parent_dir->RemoveEntry(existing_entry);
- } else {
- LOG(ERROR) << "Entry for the existing file not found: " << resource_id;
- }
-}
-
-// Callback for GetEntryByResourceIdAsync.
// Adds |entry| to |results|. Runs |callback| with |results| when
// |run_callback| is true.
void AddEntryToSearchResults(
@@ -3451,11 +3437,6 @@ void GDataFileSystem::ApplyFeedFromFileUrlMap(
}
}
-// 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
void GDataFileSystem::AddEntryToDirectoryAndCollectChangedDirectories(
GDataEntry* entry,
@@ -3467,9 +3448,6 @@ void GDataFileSystem::AddEntryToDirectoryAndCollectChangedDirectories(
changed_dirs->insert(entry->GetFilePath());
}
-// 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
void GDataFileSystem::RemoveEntryFromDirectoryAndCollectChangedDirectories(
GDataDirectory* directory,
@@ -3481,6 +3459,19 @@ void GDataFileSystem::RemoveEntryFromDirectoryAndCollectChangedDirectories(
directory->RemoveEntry(entry);
}
+// static
+void GDataFileSystem::RemoveStaleEntryOnUpload(const std::string& resource_id,
+ GDataDirectory* parent_dir,
+ GDataEntry* existing_entry) {
+ if (existing_entry &&
+ // This should always match, but just in case.
+ existing_entry->parent() == parent_dir) {
+ parent_dir->RemoveEntry(existing_entry);
+ } else {
+ LOG(ERROR) << "Entry for the existing file not found: " << resource_id;
+ }
+}
+
GDataDirectory* GDataFileSystem::FindDirectoryForNewEntry(
GDataEntry* new_entry,
const FileResourceIdMap& file_map,
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.h ('k') | chrome/browser/chromeos/gdata/gdata_files.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698