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

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

Issue 10168025: GDataDB support with leveldb. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fixes Created 8 years, 8 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 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_; }

Powered by Google App Engine
This is Rietveld 408576698