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

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

Issue 10008100: gdata: Support mouting archive file in GData cache (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: gdata: Support mounting archive files in GData cache 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
diff --git a/chrome/browser/chromeos/gdata/gdata_files.h b/chrome/browser/chromeos/gdata/gdata_files.h
index 86550591596c4ca49f8bba839a3d369c25e5fdce..0f8df3b727bbbbb029a72ad2570a187b458f17c7 100644
--- a/chrome/browser/chromeos/gdata/gdata_files.h
+++ b/chrome/browser/chromeos/gdata/gdata_files.h
@@ -167,6 +167,7 @@ class GDataFile : public GDataFileBase {
CACHE_STATE_PINNED = 0x1 << 0,
CACHE_STATE_PRESENT = 0x1 << 1,
CACHE_STATE_DIRTY = 0x1 << 2,
+ CACHE_STATE_MOUNTED = 0x1 << 3,
};
explicit GDataFile(GDataDirectory* parent, GDataRootDirectory* root);
@@ -190,6 +191,9 @@ class GDataFile : public GDataFileBase {
static bool IsCacheDirty(int cache_state) {
return cache_state & CACHE_STATE_DIRTY;
}
+ static bool IsCacheMounted(int cache_state) {
+ return cache_state & CACHE_STATE_MOUNTED;
+ }
static int SetCachePresent(int cache_state) {
return cache_state |= CACHE_STATE_PRESENT;
}
@@ -199,6 +203,9 @@ class GDataFile : public GDataFileBase {
static int SetCacheDirty(int cache_state) {
return cache_state |= CACHE_STATE_DIRTY;
}
+ static int SetCacheMounted(int cache_state) {
+ return cache_state |= CACHE_STATE_MOUNTED;
+ }
static int ClearCachePresent(int cache_state) {
return cache_state &= ~CACHE_STATE_PRESENT;
}
@@ -208,6 +215,9 @@ class GDataFile : public GDataFileBase {
static int ClearCacheDirty(int cache_state) {
return cache_state &= ~CACHE_STATE_DIRTY;
}
+ static int ClearCacheMounted(int cache_state) {
+ return cache_state &= ~CACHE_STATE_MOUNTED;
+ }
DocumentEntry::EntryKind kind() const { return kind_; }
const GURL& thumbnail_url() const { return thumbnail_url_; }
@@ -361,6 +371,9 @@ class GDataRootDirectory : public GDataDirectory {
bool IsDirty() const {
return GDataFile::IsCacheDirty(cache_state);
}
+ bool IsMounted() const {
+ return GDataFile::IsCacheMounted(cache_state);
+ }
// For debugging purposes.
std::string ToString() const;

Powered by Google App Engine
This is Rietveld 408576698