Save errno for logging before potentially overwriting it.
[chromium-blink-merge.git] / content / browser / download / download_interrupt_reasons_impl.h
blob137dcb2abc5282a4a9a149a41a987fd991ac8822
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_INTERRUPT_REASONS_IMPL_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_INTERRUPT_REASONS_IMPL_H_
8 #include "content/public/browser/download_interrupt_reasons.h"
9 #include "net/base/net_errors.h"
11 namespace content {
13 enum DownloadInterruptSource {
14 DOWNLOAD_INTERRUPT_FROM_DISK,
15 DOWNLOAD_INTERRUPT_FROM_NETWORK,
16 DOWNLOAD_INTERRUPT_FROM_SERVER,
17 DOWNLOAD_INTERRUPT_FROM_USER,
18 DOWNLOAD_INTERRUPT_FROM_CRASH
21 // Safe to call from any thread.
22 DownloadInterruptReason CONTENT_EXPORT ConvertNetErrorToInterruptReason(
23 net::Error file_error, DownloadInterruptSource source);
25 } // namespace content
27 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_INTERRUPT_REASONS_IMPL_H_