OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/history/content/browser/download_constants_utils.h" | 5 #include "components/history/content/browser/download_constants_utils.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "components/history/core/browser/download_constants.h" | 8 #include "components/history/core/browser/download_constants.h" |
9 | 9 |
10 namespace history { | 10 namespace history { |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 content::DownloadInterruptReason ToContentDownloadInterruptReason( | 107 content::DownloadInterruptReason ToContentDownloadInterruptReason( |
108 DownloadInterruptReason interrupt_reason) { | 108 DownloadInterruptReason interrupt_reason) { |
109 return static_cast<content::DownloadInterruptReason>(interrupt_reason); | 109 return static_cast<content::DownloadInterruptReason>(interrupt_reason); |
110 } | 110 } |
111 | 111 |
112 DownloadInterruptReason ToHistoryDownloadInterruptReason( | 112 DownloadInterruptReason ToHistoryDownloadInterruptReason( |
113 content::DownloadInterruptReason interrupt_reason) { | 113 content::DownloadInterruptReason interrupt_reason) { |
114 return static_cast<DownloadInterruptReason>(interrupt_reason); | 114 return static_cast<DownloadInterruptReason>(interrupt_reason); |
115 } | 115 } |
116 | 116 |
117 uint32 ToContentDownloadId(DownloadId id) { | 117 uint32_t ToContentDownloadId(DownloadId id) { |
118 DCHECK_NE(id, kInvalidDownloadId); | 118 DCHECK_NE(id, kInvalidDownloadId); |
119 return static_cast<uint32>(id); | 119 return static_cast<uint32_t>(id); |
120 } | 120 } |
121 | 121 |
122 DownloadId ToHistoryDownloadId(uint32 id) { | 122 DownloadId ToHistoryDownloadId(uint32_t id) { |
123 DCHECK_NE(id, content::DownloadItem::kInvalidId); | 123 DCHECK_NE(id, content::DownloadItem::kInvalidId); |
124 return static_cast<DownloadId>(id); | 124 return static_cast<DownloadId>(id); |
125 } | 125 } |
126 | 126 |
127 } // namespace history | 127 } // namespace history |
OLD | NEW |