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

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

Issue 9836086: Added logic that will return the result of the first chunk of root feed and continue fetching the r… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed asserts in browser_tests 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
Index: chrome/browser/chromeos/gdata/gdata_operations.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_operations.cc b/chrome/browser/chromeos/gdata/gdata_operations.cc
index ac37665faa135347c3290f20f599f9bceaacd440..0384aad91541613a95a2c44008b7f653427864b8 100644
--- a/chrome/browser/chromeos/gdata/gdata_operations.cc
+++ b/chrome/browser/chromeos/gdata/gdata_operations.cc
@@ -156,7 +156,8 @@ UrlFetchOperationBase::UrlFetchOperationBase(GDataOperationRegistry* registry,
// MessageLoopProxy is used to run |callback| on the origin thread.
relay_proxy_(base::MessageLoopProxy::current()),
re_authenticate_count_(0),
- save_temp_file_(false) {
+ save_temp_file_(false),
+ started_(false) {
}
UrlFetchOperationBase::UrlFetchOperationBase(
@@ -218,6 +219,7 @@ void UrlFetchOperationBase::Start(const std::string& auth_token) {
NotifyStart();
url_fetcher_->Start();
+ started_ = true;
}
void UrlFetchOperationBase::SetReAuthenticateCallback(
@@ -269,6 +271,11 @@ void UrlFetchOperationBase::OnURLFetchComplete(const URLFetcher* source) {
void UrlFetchOperationBase::OnAuthFailed(GDataErrorCode code) {
RunCallbackOnPrematureFailure(code);
+ // Check if this failed before we even started fetching. If so, register
+ // for start so we can properly unregister with finish.
+ if (!started_)
+ NotifyStart();
+
NotifyFinish(GDataOperationRegistry::OPERATION_FAILED);
}
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_operations.h ('k') | chrome/browser/resources/file_manager/js/file_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698