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

Unified Diff: net/url_request/url_request_job_tracker.cc

Issue 7043007: Kill URLRequestJobTracker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge. Created 9 years, 7 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 | « net/url_request/url_request_job_tracker.h ('k') | net/url_request/url_request_job_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_job_tracker.cc
diff --git a/net/url_request/url_request_job_tracker.cc b/net/url_request/url_request_job_tracker.cc
deleted file mode 100644
index 632d0a38f47729549093abfc7631310ca3997536..0000000000000000000000000000000000000000
--- a/net/url_request/url_request_job_tracker.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2010 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 "net/url_request/url_request_job_tracker.h"
-
-#include <algorithm>
-
-#include "base/logging.h"
-#include "net/url_request/url_request_job.h"
-
-namespace net {
-
-URLRequestJobTracker g_url_request_job_tracker;
-
-URLRequestJobTracker::URLRequestJobTracker() {
-}
-
-URLRequestJobTracker::~URLRequestJobTracker() {
- DLOG_IF(WARNING, !active_jobs_.empty()) <<
- "Leaking " << active_jobs_.size() << " URLRequestJob object(s), this "
- "could be because the URLRequest forgot to free it (bad), or if the "
- "program was terminated while a request was active (normal).";
-}
-
-void URLRequestJobTracker::AddNewJob(URLRequestJob* job) {
- active_jobs_.push_back(job);
- FOR_EACH_OBSERVER(JobObserver, observers_, OnJobAdded(job));
-}
-
-void URLRequestJobTracker::RemoveJob(URLRequestJob* job) {
- JobList::iterator iter = std::find(active_jobs_.begin(), active_jobs_.end(),
- job);
- if (iter == active_jobs_.end()) {
- NOTREACHED() << "Removing a non-active job";
- return;
- }
- active_jobs_.erase(iter);
-
- FOR_EACH_OBSERVER(JobObserver, observers_, OnJobRemoved(job));
-}
-
-void URLRequestJobTracker::OnJobDone(URLRequestJob* job,
- const URLRequestStatus& status) {
- FOR_EACH_OBSERVER(JobObserver, observers_, OnJobDone(job, status));
-}
-
-void URLRequestJobTracker::OnJobRedirect(URLRequestJob* job,
- const GURL& location,
- int status_code) {
- FOR_EACH_OBSERVER(JobObserver, observers_,
- OnJobRedirect(job, location, status_code));
-}
-
-void URLRequestJobTracker::OnBytesRead(URLRequestJob* job,
- const char* buf,
- int byte_count) {
- FOR_EACH_OBSERVER(JobObserver, observers_,
- OnBytesRead(job, buf, byte_count));
-}
-
-} // namespace net
« no previous file with comments | « net/url_request/url_request_job_tracker.h ('k') | net/url_request/url_request_job_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698