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

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: Fix unit tests and move download_database.{cc,h} 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_constants.h"
11 #include "components/history/core/browser/download_types.h"
12 #include "content/public/browser/download_danger_type.h"
13 #include "content/public/browser/download_interrupt_reasons.h"
14 #include "content/public/browser/download_item.h"
15
16 namespace history {
17
18 // Utility functions to convert between content::DownloadItem::DownloadState
19 // enumeration and history::DownloadState constants.
20 content::DownloadItem::DownloadState ToContentDownloadState(
21 DownloadState state);
22 DownloadState ToHistoryDownloadState(
23 content::DownloadItem::DownloadState state);
24
25 // Utility functions to convert between content::DownloadDangerType enumeration
26 // and history::DownloadDangerType constants.
27 content::DownloadDangerType ToContentDownloadDangerType(
28 DownloadDangerType danger_type);
29 DownloadDangerType ToHistoryDownloadDangerType(
30 content::DownloadDangerType danger_type);
31
32 // Utility functions to convert between content::DownloadInterrupReason
33 // enumeration and history::DownloadInterruptReason type (value have no
34 // meaning in history, but have a different type to avoid bugs due to
35 // implicit conversions).
36 content::DownloadInterruptReason ToContentDownloadInterruptReason(
37 DownloadInterruptReason interrupt_reason);
38 DownloadInterruptReason ToHistoryDownloadInterruptReason(
39 content::DownloadInterruptReason interrupt_reason);
40
41 }
42
43 #endif // COMPONENTS_HISTORY_CONTENT_BROWSER_DOWNLOAD_CONSTANTS_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698