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

Side by Side Diff: components/history/content/browser/download_constants_utils.h

Issue 833033002: Remove dependency on //content from history DownloadDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete #include Created 5 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_HISTORY_CONTENT_BROWSER_DOWNLOAD_CONSTANTS_UTILS_H_
6 #define COMPONENTS_HISTORY_CONTENT_BROWSER_DOWNLOAD_CONSTANTS_UTILS_H_
7
8 #include <string>
9
10 #include "components/history/core/browser/download_types.h"
11 #include "content/public/browser/download_danger_type.h"
12 #include "content/public/browser/download_interrupt_reasons.h"
13 #include "content/public/browser/download_item.h"
14
15 namespace history {
16
17 // Utility functions to convert between content::DownloadItem::DownloadState
18 // enumeration and history::DownloadState constants.
19 content::DownloadItem::DownloadState ToContentDownloadState(
20 DownloadState state);
21 DownloadState ToHistoryDownloadState(
22 content::DownloadItem::DownloadState state);
23
24 // Utility functions to convert between content::DownloadDangerType enumeration
25 // and history::DownloadDangerType constants.
26 content::DownloadDangerType ToContentDownloadDangerType(
27 DownloadDangerType danger_type);
28 DownloadDangerType ToHistoryDownloadDangerType(
29 content::DownloadDangerType danger_type);
30
31 // Utility functions to convert between content::DownloadInterrupReason
32 // enumeration and history::DownloadInterruptReason type (value have no
33 // meaning in history, but have a different type to avoid bugs due to
34 // implicit conversions).
35 content::DownloadInterruptReason ToContentDownloadInterruptReason(
36 DownloadInterruptReason interrupt_reason);
37 DownloadInterruptReason ToHistoryDownloadInterruptReason(
38 content::DownloadInterruptReason interrupt_reason);
39
40 // Utility functions to convert between content download id values and
41 // history::DownloadId type (value have no meaning in history, except
42 // for kInvalidDownloadId).
43 uint32 ToContentDownloadId(DownloadId id);
44 DownloadId ToHistoryDownloadId(uint32 id);
45 } // namespace history
46
47 #endif // COMPONENTS_HISTORY_CONTENT_BROWSER_DOWNLOAD_CONSTANTS_UTILS_H_
OLDNEW
« no previous file with comments | « components/history/content/browser/BUILD.gn ('k') | components/history/content/browser/download_constants_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698