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

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

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_files.h
===================================================================
--- chrome/browser/chromeos/gdata/gdata_files.h (revision 151875)
+++ chrome/browser/chromeos/gdata/gdata_files.h (working copy)
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_
#include <map>
+#include <set>
#include <string>
#include <vector>
@@ -63,6 +64,7 @@
// Converts to/from proto. Only handles the common part (i.e. does not
// touch |file_specific_info|).
bool FromProto(const GDataEntryProto& proto) WARN_UNUSED_RESULT;
+ // TODO(achuith,satorux): Should this be virtual?
void ToProto(GDataEntryProto* proto) const;
// Similar to ToProto() but this fills in |file_specific_info| and
@@ -167,10 +169,6 @@
DISALLOW_COPY_AND_ASSIGN(GDataEntry);
};
-typedef std::map<FilePath::StringType, GDataFile*> GDataFileCollection;
-typedef std::map<FilePath::StringType, GDataDirectory*>
- GDataDirectoryCollection;
-
// Represents "file" in in a GData virtual file system. On gdata feed side,
// this could be either a regular file or a server side document.
class GDataFile : public GDataEntry {
@@ -229,12 +227,6 @@
// Converts the children as a vector of GDataEntryProto.
scoped_ptr<GDataEntryProtoVector> ToProtoVector() const;
- // Collection of children files/directories.
- const GDataFileCollection& child_files() const { return child_files_; }
- const GDataDirectoryCollection& child_directories() const {
- return child_directories_;
- }
satorux1 2012/08/17 11:49:17 glad to see them gone.
-
private:
// TODO(satorux): Remove the friend statements. crbug.com/139649
friend class GDataDirectoryService;
@@ -278,7 +270,14 @@
void RemoveChildFiles();
void RemoveChildDirectories();
- // Collection of children GDataEntry items.
+ // Recursively extracts the paths set of all sub-directories.
+ void GetChildDirectoryPaths(std::set<FilePath>* child_dirs);
+
+ // Maps between base_name and resource_id of files and directories.
+ typedef std::map<FilePath::StringType, GDataFile*> GDataFileCollection;
+ typedef std::map<FilePath::StringType, GDataDirectory*>
+ GDataDirectoryCollection;
+ // Collection of children.
GDataFileCollection child_files_;
GDataDirectoryCollection child_directories_;

Powered by Google App Engine
This is Rietveld 408576698