Index: net/url_request/url_request_job.cc |
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc |
index 050ba283f66a808362612c1fa6c00756e8a841a9..60a27399587c904f0e67e8f1a1e6239b371e5b3e 100644 |
--- a/net/url_request/url_request_job.cc |
+++ b/net/url_request/url_request_job.cc |
@@ -12,7 +12,6 @@ |
#include "base/location.h" |
#include "base/memory/ptr_util.h" |
#include "base/metrics/histogram_macros.h" |
-#include "base/power_monitor/power_monitor.h" |
#include "base/profiler/scoped_tracker.h" |
#include "base/single_thread_task_runner.h" |
#include "base/strings/string_number_conversions.h" |
@@ -165,15 +164,9 @@ URLRequestJob::URLRequestJob(URLRequest* request, |
last_notified_total_received_bytes_(0), |
last_notified_total_sent_bytes_(0), |
weak_factory_(this) { |
- base::PowerMonitor* power_monitor = base::PowerMonitor::Get(); |
- if (power_monitor) |
- power_monitor->AddObserver(this); |
} |
URLRequestJob::~URLRequestJob() { |
- base::PowerMonitor* power_monitor = base::PowerMonitor::Get(); |
- if (power_monitor) |
- power_monitor->RemoveObserver(this); |
} |
void URLRequestJob::SetUpload(UploadDataStream* upload) { |
@@ -343,21 +336,6 @@ HostPortPair URLRequestJob::GetSocketAddress() const { |
return HostPortPair(); |
} |
-void URLRequestJob::OnSuspend() { |
- // Most errors generated by the Job come as the result of the one current |
- // operation the job is waiting on returning an error. This event is unusual |
- // in that the Job may have another operation ongoing, or the Job may be idle |
- // and waiting on the next call. |
- // |
- // Need to cancel through the request to make sure everything is notified |
- // of the failure (Particularly that the NetworkDelegate, which the Job may be |
- // waiting on, is notified synchronously) and torn down correctly. |
- // |
- // TODO(mmenke): This should probably fail the request with |
- // NETWORK_IO_SUSPENDED instead. |
- request_->Cancel(); |
-} |
- |
void URLRequestJob::NotifyURLRequestDestroyed() { |
} |