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

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

Issue 10702154: gdata: Fix weird code in GDataCache::CacheEntry::Set* functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_cache.h
diff --git a/chrome/browser/chromeos/gdata/gdata_cache.h b/chrome/browser/chromeos/gdata/gdata_cache.h
index c6dc377f02c667890de561604902e24da3e5e3aa..aeccbc57c97540666b00e836c1b3e90c0523a4de 100644
--- a/chrome/browser/chromeos/gdata/gdata_cache.h
+++ b/chrome/browser/chromeos/gdata/gdata_cache.h
@@ -145,24 +145,34 @@ class GDataCache {
// Setters for the states describe above.
void SetPresent(bool value) {
- cache_state = (value ? cache_state |= CACHE_STATE_PRESENT :
- cache_state &= ~CACHE_STATE_PRESENT);
+ if (value)
+ cache_state |= CACHE_STATE_PRESENT;
+ else
+ cache_state &= ~CACHE_STATE_PRESENT;
}
void SetPinned(bool value) {
- cache_state = (value ? cache_state |= CACHE_STATE_PINNED :
- cache_state &= ~CACHE_STATE_PINNED);
+ if (value)
+ cache_state |= CACHE_STATE_PINNED;
+ else
+ cache_state &= ~CACHE_STATE_PINNED;
}
void SetDirty(bool value) {
- cache_state = (value ? cache_state |= CACHE_STATE_DIRTY :
- cache_state &= ~CACHE_STATE_DIRTY);
+ if (value)
+ cache_state |= CACHE_STATE_DIRTY;
+ else
+ cache_state &= ~CACHE_STATE_DIRTY;
}
void SetMounted(bool value) {
- cache_state = (value ? cache_state |= CACHE_STATE_MOUNTED :
- cache_state &= ~CACHE_STATE_MOUNTED);
+ if (value)
+ cache_state |= CACHE_STATE_MOUNTED;
+ else
+ cache_state &= ~CACHE_STATE_MOUNTED;
}
void SetPersistent(bool value) {
- cache_state = (value ? cache_state |= CACHE_STATE_PERSISTENT :
- cache_state &= ~CACHE_STATE_PERSISTENT);
+ if (value)
+ cache_state |= CACHE_STATE_PERSISTENT;
+ else
+ cache_state &= ~CACHE_STATE_PERSISTENT;
}
// Returns the type of the sub directory where the cache file is stored.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698