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

Unified Diff: components/history/core/browser/download_constants.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 side-by-side diff with in-line comments
Download patch
Index: components/history/core/browser/download_constants.h
diff --git a/components/history/core/browser/download_constants.h b/components/history/core/browser/download_constants.h
new file mode 100644
index 0000000000000000000000000000000000000000..ea6889fbdb30424b4d42f00f3befe3ae81b620d3
--- /dev/null
+++ b/components/history/core/browser/download_constants.h
@@ -0,0 +1,47 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_CONSTANTS_H_
+#define COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_CONSTANTS_H_
+
+#include "components/history/core/browser/download_types.h"
+
+namespace history {
+
+// DownloadState represents the state of a DownloadRow saved into the
+// DownloadDatabase. The values must not be changed as they are saved
+// to disk in the database.
+extern const DownloadState kStateInvalid;
+extern const DownloadState kStateInProgress;
+extern const DownloadState kStateComplete;
+extern const DownloadState kStateCancelled;
+extern const DownloadState kStateBug140687;
+extern const DownloadState kStateInterrupted;
+
+DownloadState IntToDownloadState(int state);
+
+// DownloadDangerType represents the danger of a DownloadRow into the
+// DownloadDatabase. The values must not be changed as they are saved
+// to disk in the database.
+extern const DownloadDangerType kDangerTypeInvalid;
+extern const DownloadDangerType kDangerTypeNotDangerous;
+extern const DownloadDangerType kDangerTypeDangerousFile;
+extern const DownloadDangerType kDangerTypeDangerousUrl;
+extern const DownloadDangerType kDangerTypeDangerousContent;
+extern const DownloadDangerType kDangerTypeMaybeDangerousContent;
+extern const DownloadDangerType kDangerTypeUncommonContent;
+extern const DownloadDangerType kDangerTypeUserValidated;
+extern const DownloadDangerType kDangerTypeDangerousHost;
+extern const DownloadDangerType kDangerTypePotentiallyUnwanted;
+
+DownloadDangerType IntToDownloadDangerType(int state);
+
+// DownloadId represents the id of a DownloadRow into the DownloadDatabase.
+// The value is controlled by the embedder except for the reserved id
+// kInvalidDownloadId.
+extern const DownloadId kInvalidDownloadId;
+
+} // namespace
+
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_DOWNLOAD_CONSTANTS_H_

Powered by Google App Engine
This is Rietveld 408576698