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

Unified Diff: content/public/test/download_test_observer.h

Issue 114193009: [Download] Return DownloadInterruptReason from OnStartedCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « content/public/browser/resource_dispatcher_host.h ('k') | content/public/test/download_test_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/download_test_observer.h
diff --git a/content/public/test/download_test_observer.h b/content/public/test/download_test_observer.h
index 15a055dfd56f0a10d401c7db12c3742fb552addf..a06e994fba81d823de0606413174bc79a07c8a16 100644
--- a/content/public/test/download_test_observer.h
+++ b/content/public/test/download_test_observer.h
@@ -11,10 +11,10 @@
#include "base/basictypes.h"
#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
+#include "content/public/browser/download_interrupt_reasons.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/download_url_parameters.h"
-#include "net/base/net_errors.h"
namespace content {
@@ -282,9 +282,11 @@ class DownloadTestItemCreationObserver
void WaitForDownloadItemCreation();
uint32 download_id() const { return download_id_; }
- net::Error error() const { return error_; }
+ DownloadInterruptReason interrupt_reason() const { return interrupt_reason_; }
bool started() const { return called_back_count_ > 0; }
- bool succeeded() const { return started() && (error_ == net::OK); }
+ bool succeeded() const {
+ return started() && interrupt_reason_ == DOWNLOAD_INTERRUPT_REASON_NONE;
+ }
const DownloadUrlParameters::OnStartedCallback callback();
@@ -293,11 +295,12 @@ class DownloadTestItemCreationObserver
~DownloadTestItemCreationObserver();
- void DownloadItemCreationCallback(DownloadItem* item, net::Error error);
+ void DownloadItemCreationCallback(DownloadItem* item,
+ DownloadInterruptReason interrupt_reason);
// The download creation information we received.
uint32 download_id_;
- net::Error error_;
+ DownloadInterruptReason interrupt_reason_;
// Count of callbacks.
size_t called_back_count_;
« no previous file with comments | « content/public/browser/resource_dispatcher_host.h ('k') | content/public/test/download_test_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698