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

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

Issue 9877006: gdata: Fix a bug that blocked FILE thread when loading large feeds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc » ('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.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.cc b/chrome/browser/chromeos/gdata/gdata_file_system.cc
index 07811d203228113bd374c03c966cdb84cfb7855e..72af5d9dc8bf0f0d2da30a3ca5908063558a0c56 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.cc
@@ -18,6 +18,7 @@
#include "base/message_loop_proxy.h"
#include "base/platform_file.h"
#include "base/threading/platform_thread.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "base/synchronization/waitable_event.h"
#include "base/values.h"
#include "chrome/browser/chromeos/gdata/gdata_documents_service.h"
@@ -1828,8 +1829,10 @@ void GDataFileSystem::LoadRootFeedFromCache(
new base::PlatformFileError(base::PLATFORM_FILE_OK);
base::ListValue* feed_list = new base::ListValue;
- PostBlockingPoolSequencedTaskAndReply(
- kGDataFileSystemToken,
+ // Post a task without the sequence token, as this doesn't have to be
+ // sequenced with other tasks, and can take long if the feed is large.
+ // Note that it's OK to do this before the cache is initialized.
+ BrowserThread::GetBlockingPool()->PostTaskAndReply(
FROM_HERE,
base::Bind(&GDataFileSystem::LoadRootFeedOnIOThreadPool,
cache_paths_[GDataRootDirectory::CACHE_TYPE_META].Append(
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698