Index: chrome/browser/chromeos/gdata/gdata_files.h |
=================================================================== |
--- chrome/browser/chromeos/gdata/gdata_files.h (revision 133339) |
+++ chrome/browser/chromeos/gdata/gdata_files.h (working copy) |
@@ -59,15 +59,25 @@ |
public: |
explicit GDataEntry(GDataDirectory* parent, GDataRootDirectory* root); |
virtual ~GDataEntry(); |
+ |
virtual GDataFile* AsGDataFile(); |
virtual GDataDirectory* AsGDataDirectory(); |
virtual GDataRootDirectory* AsGDataRootDirectory(); |
+ // const versions of AsGDataFile and AsGDataDirectory. |
+ const GDataFile* AsGDataFile() const; |
satorux1
2012/04/23 17:40:41
function overloading should be avoided. can you re
achuithb
2012/04/24 08:09:36
Done.
|
+ const GDataDirectory* AsGDataDirectory() const; |
+ |
// Converts DocumentEntry into GDataEntry. |
static GDataEntry* FromDocumentEntry(GDataDirectory* parent, |
DocumentEntry* doc, |
GDataRootDirectory* root); |
+ // Serialize/Parse to/from string via proto classes. |
+ void SerializeToString(std::string* serialized_proto) const; |
+ static scoped_ptr<GDataEntry> FromProtoString( |
+ const std::string& serialized_proto); |
+ |
// Convert to/from proto. |
void FromProto(const GDataEntryProto& proto); |
void ToProto(GDataEntryProto* proto) const; |
@@ -81,20 +91,20 @@ |
GDataDirectory* parent() { return parent_; } |
const base::PlatformFileInfo& file_info() const { return file_info_; } |
+ |
const FilePath::StringType& file_name() const { return file_name_; } |
- const FilePath::StringType& title() const { |
- return title_; |
- } |
- void set_title(const FilePath::StringType& title) { |
- title_ = title; |
- } |
void set_file_name(const FilePath::StringType& name) { file_name_ = name; } |
+ const FilePath::StringType& title() const { return title_; } |
+ void set_title(const FilePath::StringType& title) { title_ = title; } |
+ |
// The unique resource ID associated with this file system entry. |
const std::string& resource_id() const { return resource_id_; } |
+ void set_resource_id(const std::string& res_id) { resource_id_ = res_id; } |
// The content URL is used for downloading regular files as is. |
const GURL& content_url() const { return content_url_; } |
+ void set_content_url(const GURL& url) { content_url_ = url; } |
// The edit URL is used for removing files and hosted documents. |
const GURL& edit_url() const { return edit_url_; } |
@@ -211,6 +221,7 @@ |
const std::string& etag() const { return etag_; } |
const std::string& id() const { return id_; } |
const std::string& file_md5() const { return file_md5_; } |
+ void set_file_md5(const std::string& file_md5) { file_md5_ = file_md5; } |
const std::string& document_extension() const { return document_extension_; } |
bool is_hosted_document() const { return is_hosted_document_; } |