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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc

Issue 10538071: gdata: Convert FindEntryByResourceIdSync() to asynchronous. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase svn:trunk/src@141679 and resolve conflicts. 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
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.cc ('k') | chrome/browser/chromeos/gdata/gdata_files.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
index 2ca13a128cd135b76436f3f1e4d14ac7c550fd4a..e32aad1e6084785c4790ded2ca17b83c3d38b754 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
@@ -327,10 +327,8 @@ class GDataFileSystemTest : public testing::Test {
}
GDataEntry* FindEntry(const FilePath& file_path) {
- GDataEntry* entry = NULL;
- file_system_->root_->FindEntryByPath(
- file_path, base::Bind(&ReadOnlyFindEntryCallback, &entry));
- return entry;
+ base::AutoLock lock(file_system_->lock_);
+ return file_system_->GetGDataEntryByPath(file_path);
}
void FindAndTestFilePath(const FilePath& file_path) {
@@ -340,10 +338,8 @@ class GDataFileSystemTest : public testing::Test {
}
GDataEntry* FindEntryByResourceId(const std::string& resource_id) {
- GDataEntry* entry = NULL;
- file_system_->FindEntryByResourceIdSync(
- resource_id, base::Bind(&ReadOnlyFindEntryCallback, &entry));
- return entry;
+ GDataEntry* entry = file_system_->root_->GetEntryByResourceId(resource_id);
+ return entry ? entry->AsGDataFile() : NULL;
}
// Gets the entry info for |file_path| and compares the contents against
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.cc ('k') | chrome/browser/chromeos/gdata/gdata_files.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698