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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_private_api.cc

Issue 10690028: gdata: Get rid of GDataFileSystem::GetCacheState() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 6 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/extensions/file_browser_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
index 767853fee14535d799e46536ac25d8541b8521d6..492182284c686282ee1b9634b1a266bebfdbeedf 100644
--- a/chrome/browser/chromeos/extensions/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_private_api.cc
@@ -1824,7 +1824,7 @@ void GetGDataFilePropertiesFunction::OnOperationComplete(
}
}
- system_service->file_system()->GetCacheState(
+ system_service->cache()->GetCacheEntryOnUIThread(
file_proto->gdata_entry().resource_id(),
file_proto->file_md5(),
base::Bind(
@@ -1834,19 +1834,22 @@ void GetGDataFilePropertiesFunction::OnOperationComplete(
void GetGDataFilePropertiesFunction::CacheStateReceived(
base::DictionaryValue* property_dict,
- base::PlatformFileError error,
- int cache_state) {
- property_dict->SetBoolean(
- "isPinned",
- gdata::GDataCache::IsCachePinned(cache_state));
-
- property_dict->SetBoolean(
- "isPresent",
- gdata::GDataCache::IsCachePresent(cache_state));
-
- property_dict->SetBoolean(
- "isDirty",
- gdata::GDataCache::IsCacheDirty(cache_state));
+ bool success,
+ const gdata::GDataCache::CacheEntry& cache_entry) {
+ if (success) {
hshi1 2012/06/28 22:11:21 Should any action be taken when (success == false)
satorux1 2012/06/28 22:41:17 Previously, cache_state was CACHE_STATE_NONE on er
+ int cache_state = cache_entry.cache_state;
+ property_dict->SetBoolean(
+ "isPinned",
+ gdata::GDataCache::IsCachePinned(cache_state));
+
+ property_dict->SetBoolean(
+ "isPresent",
+ gdata::GDataCache::IsCachePresent(cache_state));
+
+ property_dict->SetBoolean(
+ "isDirty",
+ gdata::GDataCache::IsCacheDirty(cache_state));
+ }
CompleteGetFileProperties();
}

Powered by Google App Engine
This is Rietveld 408576698