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

Side by Side Diff: content/public/browser/download_interrupt_reasons.h

Issue 9639001: Move download interrupt reasons to content\public (the enum that's used by chrome). The rest keep i… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: nits Created 8 years, 9 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 #ifndef CHROME_BROWSER_DOWNLOAD_INTERRUPT_REASONS_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_INTERRUPT_REASONS_H_
6 #define CHROME_BROWSER_DOWNLOAD_INTERRUPT_REASONS_H_ 6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_INTERRUPT_REASONS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "net/base/net_errors.h"
13 12
14 enum InterruptReason { 13 namespace content {
14
15 enum DownloadInterruptReason {
15 DOWNLOAD_INTERRUPT_REASON_NONE = 0, 16 DOWNLOAD_INTERRUPT_REASON_NONE = 0,
16 17
17 #define INTERRUPT_REASON(name, value) DOWNLOAD_INTERRUPT_REASON_##name = value, 18 #define INTERRUPT_REASON(name, value) DOWNLOAD_INTERRUPT_REASON_##name = value,
18 19
19 #include "content/browser/download/interrupt_reason_values.h" 20 #include "content/public/browser/download_interrupt_reason_values.h"
20 21
21 #undef INTERRUPT_REASON 22 #undef INTERRUPT_REASON
22 }; 23 };
23 24
24 enum DownloadInterruptSource { 25 std::string CONTENT_EXPORT InterruptReasonDebugString(
25 DOWNLOAD_INTERRUPT_FROM_DISK, 26 DownloadInterruptReason error);
26 DOWNLOAD_INTERRUPT_FROM_NETWORK,
27 DOWNLOAD_INTERRUPT_FROM_SERVER,
28 DOWNLOAD_INTERRUPT_FROM_USER,
29 DOWNLOAD_INTERRUPT_FROM_CRASH
30 };
31 27
32 // Safe to call from any thread. 28 } // namespace content
33 InterruptReason CONTENT_EXPORT ConvertNetErrorToInterruptReason(
34 net::Error file_error, DownloadInterruptSource source);
35 29
36 std::string CONTENT_EXPORT InterruptReasonDebugString(InterruptReason error); 30 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_INTERRUPT_REASONS_H_
37
38 #endif // CHROME_BROWSER_DOWNLOAD_INTERRUPT_REASONS_H_
OLDNEW
« no previous file with comments | « content/public/browser/download_interrupt_reason_values.h ('k') | content/public/browser/download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698