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

Unified Diff: chrome/browser/extensions/extension_downloads_api_constants.cc

Issue 8451019: Move download extension api implementation to download/ dir. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aa review Created 9 years, 1 month 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: chrome/browser/extensions/extension_downloads_api_constants.cc
diff --git a/chrome/browser/extensions/extension_downloads_api_constants.cc b/chrome/browser/extensions/extension_downloads_api_constants.cc
deleted file mode 100644
index 4a0db5307bb1329e215eadb19fd9e19c58c3d87c..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/extension_downloads_api_constants.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (c) 2011 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.
-
-#include "chrome/browser/extensions/extension_downloads_api_constants.h"
-
-namespace extension_downloads_api_constants {
-
-// Error messages
-const char kNotImplemented[] = "NotImplemented";
-const char kGenericError[] = "I'm afraid I can't do that.";
-const char kInvalidURL[] = "Invalid URL";
-
-// Parameter keys
-const char kBodyKey[] = "body";
-const char kBytesReceivedKey[] = "bytesReceived";
-const char kDangerAcceptedKey[] = "dangerAccepted";
-const char kDangerFile[] = "file";
-const char kDangerKey[] = "danger";
-const char kDangerSafe[] = "safe";
-const char kDangerUrl[] = "url";
-const char kEndTimeKey[] = "endTime";
-const char kErrorKey[] = "error";
-const char kFileSizeKey[] = "fileSize";
-const char kFilenameKey[] = "filename";
-const char kHeaderNameKey[] = "name";
-const char kHeaderValueKey[] = "value";
-const char kHeadersKey[] = "headers";
-const char kIdKey[] = "id";
-const char kMethodKey[] = "method";
-const char kMimeKey[] = "mime";
-const char kPausedKey[] = "paused";
-const char kSaveAsKey[] = "saveAs";
-const char kStartTimeKey[] = "startTime";
-const char kStateComplete[] = "complete";
-const char kStateInProgress[] = "in_progress";
-const char kStateInterrupted[] = "interrupted";
-const char kStateKey[] = "state";
-const char kTotalBytesKey[] = "totalBytes";
-const char kUrlKey[] = "url";
-
-const char* DangerString(DownloadItem::DangerType danger) {
- switch (danger) {
- case DownloadItem::NOT_DANGEROUS: return kDangerSafe;
- case DownloadItem::DANGEROUS_FILE: return kDangerFile;
- case DownloadItem::DANGEROUS_URL: return kDangerUrl;
- default:
- NOTREACHED();
- return "";
- }
-}
-
-const char* StateString(DownloadItem::DownloadState state) {
- switch (state) {
- case DownloadItem::IN_PROGRESS: return kStateInProgress;
- case DownloadItem::COMPLETE: return kStateComplete;
- case DownloadItem::INTERRUPTED: // fall through
- case DownloadItem::CANCELLED: return kStateInterrupted;
- case DownloadItem::REMOVING: // fall through
- default:
- NOTREACHED();
- return "";
- }
-}
-} // namespace extension_downloads_api_constants

Powered by Google App Engine
This is Rietveld 408576698