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

Unified Diff: chrome/browser/download/download_extension_api.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/plugin_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_extension_api.cc
===================================================================
--- chrome/browser/download/download_extension_api.cc (revision 125463)
+++ chrome/browser/download/download_extension_api.cc (working copy)
@@ -39,8 +39,8 @@
#include "chrome/browser/ui/webui/web_ui_util.h"
#include "content/browser/download/download_state_info.h"
#include "content/browser/download/download_types.h"
-#include "content/browser/download/interrupt_reasons.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
+#include "content/public/browser/download_interrupt_reasons.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
@@ -188,11 +188,12 @@
(item->GetStartTime() - base::Time::UnixEpoch()).InMilliseconds());
json->SetInteger(kBytesReceivedKey, item->GetReceivedBytes());
json->SetInteger(kTotalBytesKey, item->GetTotalBytes());
- if (item->GetState() == DownloadItem::INTERRUPTED)
+ if (item->GetState() == DownloadItem::INTERRUPTED) {
json->SetInteger(kErrorKey, static_cast<int>(item->GetLastReason()));
- else if (item->GetState() == DownloadItem::CANCELLED)
+ } else if (item->GetState() == DownloadItem::CANCELLED) {
json->SetInteger(kErrorKey, static_cast<int>(
- DOWNLOAD_INTERRUPT_REASON_USER_CANCELED));
+ content::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED));
+ }
// TODO(benjhayden): Implement endTime and fileSize.
// json->SetInteger(kEndTimeKey, -1);
json->SetInteger(kFileSizeKey, item->GetTotalBytes());
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/plugin_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698