Commit 97adc7e7 authored by satorux@chromium.org's avatar satorux@chromium.org

gdata: Introduce GDataWapiFeedLoader class

This class is introduced to separate code related to WAPI
(codename of Documents List API) feed loading.

To minimize diffs, the the class is defined in gdata_file_system.cc
The code will be moved to a set of new files in a separate patch.

BUG=130669
TEST=out/Release/unit_tests --gtest_filter=GData* && out/Release/browser_tests --gtest_filter=GData*

Review URL: https://chromiumcodereview.appspot.com/10828126

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149591 0039d316-1c4b-4281-b951-d872f2087c98
parent 37b92732
......@@ -328,7 +328,7 @@ class GDataFileSystemTest : public testing::Test {
bool UpdateContent(const std::vector<DocumentFeed*>& list,
int largest_changestamp) {
GURL unused;
return file_system_->UpdateFromFeed(
return file_system_->UpdateFromFeedForTesting(
list,
largest_changestamp,
root_feed_changestamp_++) == GDATA_FILE_OK;
......
......@@ -515,6 +515,13 @@ GDataEntry* GDataDirectoryService::FindEntryByPathSync(
return NULL;
}
void GDataDirectoryService::FindEntryByPathAndRunSync(
const FilePath& search_file_path,
const FindEntryCallback& callback) {
GDataEntry* entry = FindEntryByPathSync(search_file_path);
callback.Run(entry ? GDATA_FILE_OK : GDATA_FILE_ERROR_NOT_FOUND, entry);
}
GDataEntry* GDataDirectoryService::GetEntryByResourceId(
const std::string& resource) {
// GDataFileSystem has already locked.
......
......@@ -379,6 +379,11 @@ class GDataDirectoryService {
// TODO(satorux): Replace this with an async version crbug.com/137160
GDataEntry* FindEntryByPathSync(const FilePath& file_path);
// Searches for |file_path| synchronously, and runs |callback|.
// TODO(satorux): Replace this with an async version crbug.com/137160
void FindEntryByPathAndRunSync(const FilePath& file_path,
const FindEntryCallback& callback);
// Returns the GDataEntry* with the corresponding |resource_id|.
// TODO(achuith): Get rid of this in favor of async version crbug.com/13957.
GDataEntry* GetEntryByResourceId(const std::string& resource_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment