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

Unified Diff: chrome/browser/chromeos/policy/upload_job_impl.h

Issue 1875443003: Retry uploading in UploadJobImpl when error occurs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove missing method Created 4 years, 8 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/policy/upload_job_impl.h
diff --git a/chrome/browser/chromeos/policy/upload_job_impl.h b/chrome/browser/chromeos/policy/upload_job_impl.h
index 96d7df125759418c052398d7dc0c212bc6076341..3685740898af8272fb928638ecdafc920ca26706 100644
--- a/chrome/browser/chromeos/policy/upload_job_impl.h
+++ b/chrome/browser/chromeos/policy/upload_job_impl.h
@@ -66,6 +66,14 @@ class UploadJobImpl : public UploadJob,
private:
// Indicates the current state of the UploadJobImpl.
+ // State transitions for successful upload:
+ // IDLE -> ACQUIRING_TOKEN -> PREPARING_CONTENT -> UPLOADING -> SUCCESS
+ // If error happens, state goes back to ACQUIRING_TOKEN
+ // State transitions when error occurs once:
+ // IDLE -> ACQUIRING_TOKEN -> PREPARING_CONTENT -> UPLOADING ->
+ // -> ACQUIRING_TOKEN -> PREPARING_CONTENT -> UPLOADING -> SUCCESS
+ // State transitions when tried unsuccessfully kMaxRetries times:
+ // ... -> PPREPARING_CONTENT -> UPLOADING -> ERROR
Andrew T Wilson (Slow) 2016/04/08 15:42:56 nit: PPREPARING->PREPARING
Marton Hunyady 2016/04/08 16:47:46 Done.
enum State {
IDLE, // Start() has not been called.
ACQUIRING_TOKEN, // Trying to acquire the access token.
@@ -85,6 +93,8 @@ class UploadJobImpl : public UploadJob,
// net::URLFetcherDelegate:
void OnURLFetchComplete(const net::URLFetcher* source) override;
+ void HandleError(ErrorCode errorCode);
+
// Requests an access token for the upload scope.
void RequestAccessToken();
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/upload_job_impl.cc » ('j') | chrome/browser/chromeos/policy/upload_job_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698