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

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

Issue 10854199: ResourceId and unit test cleanup. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: minor Created 8 years, 4 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_wapi_feed_processor.cc
===================================================================
--- chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.cc (revision 151875)
+++ chrome/browser/chromeos/gdata/gdata_wapi_feed_processor.cc (working copy)
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <utility>
+
#include "base/metrics/histogram.h"
#include "chrome/browser/chromeos/gdata/gdata_directory_service.h"
#include "chrome/browser/chromeos/gdata/gdata_files.h"
@@ -12,26 +14,6 @@
namespace gdata {
-namespace {
-
-// Recursively extracts the paths set of all sub-directories of |entry|.
-void GetChildDirectoryPaths(GDataEntry* entry,
- std::set<FilePath>* changed_dirs) {
- GDataDirectory* dir = entry->AsGDataDirectory();
- if (!dir)
- return;
-
- for (GDataDirectoryCollection::const_iterator it =
- dir->child_directories().begin();
- it != dir->child_directories().end(); ++it) {
- GDataDirectory* child_dir = it->second;
- changed_dirs->insert(child_dir->GetFilePath());
- GetChildDirectoryPaths(child_dir, changed_dirs);
- }
-}
-
-} // namespace
-
FeedToFileResourceMapUmaStats::FeedToFileResourceMapUmaStats()
: num_regular_files(0),
num_hosted_documents(0) {
@@ -218,7 +200,9 @@
std::set<FilePath>* changed_dirs) {
// Get the list of all sub-directory paths, so we can notify their listeners
// that they are smoked.
- GetChildDirectoryPaths(entry, changed_dirs);
+ GDataDirectory* dir = entry->AsGDataDirectory();
+ if (dir)
+ dir->GetChildDirectoryPaths(changed_dirs);
directory->RemoveEntry(entry);
}

Powered by Google App Engine
This is Rietveld 408576698