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

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

Issue 9545006: This adds some GData private API to the file manager (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adding dirty bit and edit url Created 8 years, 10 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_file_system.h
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.h b/chrome/browser/chromeos/gdata/gdata_file_system.h
index 4519ff6d944d6006c13794d5885940c0440616ec..fbd01b6e51fcf3f243f7f263ce103e722f377527 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.h
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.h
@@ -67,6 +67,14 @@ typedef std::map<FilePath::StringType, GDataFileBase*> GDataFileCollection;
// this could be either a regular file or a server side document.
class GDataFile : public GDataFileBase {
public:
+ // This is used as a bitmask for the cache state.
+ enum CacheState {
+ CACHE_STATE_NONE = 0x0,
+ CACHE_STATE_PINNED = 0x1 << 0,
+ CACHE_STATE_PRESENT = 0x1 << 1,
+ CACHE_STATE_DIRTY = 0x1 << 2,
+ };
+
explicit GDataFile(GDataDirectory* parent);
virtual ~GDataFile();
virtual GDataFile* AsGDataFile() OVERRIDE;
@@ -76,21 +84,28 @@ class GDataFile : public GDataFileBase {
DocumentEntry::EntryKind kind() const { return kind_; }
const GURL& content_url() const { return content_url_; }
+ const GURL& thumbnail_url() const { return edit_url_; }
zel 2012/03/01 22:14:18 thumbnail_url_
+ const GURL& edit_url() const { return thumbnail_url_; }
zel 2012/03/01 22:14:18 edit_url_
const std::string& content_mime_type() const { return content_mime_type_; }
const std::string& etag() const { return etag_; }
const std::string& resource() const { return resource_id_; }
const std::string& id() const { return id_; }
const std::string& file_md5() const { return file_md5_; }
+ // Returns a bitmask of CacheState enum values.
+ const int cache_state() const { return cache_state_; }
private:
// Content URL for files.
DocumentEntry::EntryKind kind_;
GURL content_url_;
+ GURL thumbnail_url_;
+ GURL edit_url_;
std::string content_mime_type_;
std::string etag_;
std::string resource_id_;
std::string id_;
std::string file_md5_;
+ int cache_state_;
DISALLOW_COPY_AND_ASSIGN(GDataFile);
};
@@ -335,7 +350,7 @@ class GDataFileSystemFactory : public ProfileKeyedServiceFactory {
// yet created.
static GDataFileSystem* GetForProfile(Profile* profile);
- // Returns the GDataFileSystemFactory instance.
+ // Returns the GDataFileSystemFactory instance.
static GDataFileSystemFactory* GetInstance();
private:

Powered by Google App Engine
This is Rietveld 408576698