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

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

Issue 10386226: gdata: Add requestDirectoryRefresh to file_browser_private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix dcheck failures Created 8 years, 7 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_files.h ('k') | chrome/browser/chromeos/gdata/mock_gdata_file_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_files.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_files.cc b/chrome/browser/chromeos/gdata/gdata_files.cc
index 7d9f41ea69bccd925d404f0d1de3acbb67e4318b..47d6435d90f89d38ef2a5c33690c74633dd701fb 100644
--- a/chrome/browser/chromeos/gdata/gdata_files.cc
+++ b/chrome/browser/chromeos/gdata/gdata_files.cc
@@ -384,7 +384,11 @@ bool GDataDirectory::RemoveChild(GDataEntry* entry) {
}
void GDataDirectory::RemoveChildren() {
- // Remove child files first.
+ RemoveChildFiles();
+ RemoveChildDirectories();
+}
+
+void GDataDirectory::RemoveChildFiles() {
for (GDataFileCollection::const_iterator iter = child_files_.begin();
iter != child_files_.end(); ++iter) {
if (root_)
@@ -392,7 +396,9 @@ void GDataDirectory::RemoveChildren() {
}
STLDeleteValues(&child_files_);
child_files_.clear();
+}
+void GDataDirectory::RemoveChildDirectories() {
for (GDataDirectoryCollection::iterator iter = child_directories_.begin();
iter != child_directories_.end(); ++iter) {
GDataDirectory* dir = iter->second;
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_files.h ('k') | chrome/browser/chromeos/gdata/mock_gdata_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698