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

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

Issue 114193009: [Download] Return DownloadInterruptReason from OnStartedCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
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 #include "content/browser/download/download_interrupt_reasons_impl.h" 5 #include "content/browser/download/download_interrupt_reasons_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED; 81 return DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED;
82 default: 82 default:
83 break; 83 break;
84 } 84 }
85 85
86 NOTREACHED(); 86 NOTREACHED();
87 87
88 return DOWNLOAD_INTERRUPT_REASON_NONE; 88 return DOWNLOAD_INTERRUPT_REASON_NONE;
89 } 89 }
90 90
91 std::string InterruptReasonDebugString(DownloadInterruptReason error) { 91 std::string DownloadInterruptReasonToString(DownloadInterruptReason error) {
92 92
93 #define INTERRUPT_REASON(name, value) \ 93 #define INTERRUPT_REASON(name, value) \
94 case DOWNLOAD_INTERRUPT_REASON_##name: return #name; 94 case DOWNLOAD_INTERRUPT_REASON_##name: return #name;
95 95
96 switch (error) { 96 switch (error) {
97 INTERRUPT_REASON(NONE, 0) 97 INTERRUPT_REASON(NONE, 0)
98 98
99 #include "content/public/browser/download_interrupt_reason_values.h" 99 #include "content/public/browser/download_interrupt_reason_values.h"
100 100
101 default: 101 default:
102 break; 102 break;
103 } 103 }
104 104
105 #undef INTERRUPT_REASON 105 #undef INTERRUPT_REASON
106 106
107 return "Unknown error"; 107 return "Unknown error";
108 } 108 }
109 109
110 } // namespace content 110 } // namespace content
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/downloads.idl ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698