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

Side by Side Diff: content/browser/download/download_item_impl.cc

Issue 1444253003: Use If-Range instead of If-Match/If-Unmodified-Since for partial requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make it obvious that the interrupt reason is obsolete. Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // File method ordering: Methods in this file are in the same order as 5 // File method ordering: Methods in this file are in the same order as
6 // in download_item_impl.h, with the following exception: The public 6 // in download_item_impl.h, with the following exception: The public
7 // interface Start is placed in chronological order with the other 7 // interface Start is placed in chronological order with the other
8 // (private) routines that together define a DownloadItem's state 8 // (private) routines that together define a DownloadItem's state
9 // transitions as the download progresses. See "Download progression 9 // transitions as the download progresses. See "Download progression
10 // cascade" later in this file. 10 // cascade" later in this file.
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 if (force_restart && force_user) 884 if (force_restart && force_user)
885 mode = RESUME_MODE_USER_RESTART; 885 mode = RESUME_MODE_USER_RESTART;
886 else if (force_restart) 886 else if (force_restart)
887 mode = RESUME_MODE_IMMEDIATE_RESTART; 887 mode = RESUME_MODE_IMMEDIATE_RESTART;
888 else if (force_user) 888 else if (force_user)
889 mode = RESUME_MODE_USER_CONTINUE; 889 mode = RESUME_MODE_USER_CONTINUE;
890 else 890 else
891 mode = RESUME_MODE_IMMEDIATE_CONTINUE; 891 mode = RESUME_MODE_IMMEDIATE_CONTINUE;
892 break; 892 break;
893 893
894 case DOWNLOAD_INTERRUPT_REASON_SERVER_PRECONDITION:
895 case DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE: 894 case DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE:
896 case DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT: 895 case DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT:
897 if (force_user) 896 if (force_user)
898 mode = RESUME_MODE_USER_RESTART; 897 mode = RESUME_MODE_USER_RESTART;
899 else 898 else
900 mode = RESUME_MODE_IMMEDIATE_RESTART; 899 mode = RESUME_MODE_IMMEDIATE_RESTART;
901 break; 900 break;
902 901
903 case DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED: 902 case DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED:
904 case DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED: 903 case DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED:
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
1805 case RESUME_MODE_USER_CONTINUE: 1804 case RESUME_MODE_USER_CONTINUE:
1806 return "USER_CONTINUE"; 1805 return "USER_CONTINUE";
1807 case RESUME_MODE_USER_RESTART: 1806 case RESUME_MODE_USER_RESTART:
1808 return "USER_RESTART"; 1807 return "USER_RESTART";
1809 } 1808 }
1810 NOTREACHED() << "Unknown resume mode " << mode; 1809 NOTREACHED() << "Unknown resume mode " << mode;
1811 return "unknown"; 1810 return "unknown";
1812 } 1811 }
1813 1812
1814 } // namespace content 1813 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698