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

Side by Side Diff: net/url_request/url_request_job_tracker.cc

Issue 42013: Slight code change to make some global variables const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_ftp_job.h ('k') | sandbox/sandbox_poc/pocdll/invasive.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <algorithm> 5 #include <algorithm>
6 6
7 #include "net/url_request/url_request_job_tracker.h" 7 #include "net/url_request/url_request_job_tracker.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "net/url_request/url_request_job.h" 10 #include "net/url_request/url_request_job.h"
11 11
12 URLRequestJobTracker g_url_request_job_tracker; 12 URLRequestJobTracker g_url_request_job_tracker;
13 13
14 URLRequestJobTracker::URLRequestJobTracker() { 14 URLRequestJobTracker::URLRequestJobTracker() {
15 } 15 }
16 16
17 URLRequestJobTracker::~URLRequestJobTracker() { 17 URLRequestJobTracker::~URLRequestJobTracker() {
18 DLOG_IF(WARNING, active_jobs_.size() != 0) << 18 DLOG_IF(WARNING, active_jobs_.size() != 0) <<
19 "Leaking " << active_jobs_.size() << " URLRequestJob object(s), this could b e " 19 "Leaking " << active_jobs_.size() << " URLRequestJob object(s), this could "
20 "because the URLRequest forgot to free it (bad), or if the program was " 20 "be because the URLRequest forgot to free it (bad), or if the program was "
21 "terminated while a request was active (normal)."; 21 "terminated while a request was active (normal).";
22 } 22 }
23 23
24 void URLRequestJobTracker::AddNewJob(URLRequestJob* job) { 24 void URLRequestJobTracker::AddNewJob(URLRequestJob* job) {
25 active_jobs_.push_back(job); 25 active_jobs_.push_back(job);
26 FOR_EACH_OBSERVER(JobObserver, observers_, OnJobAdded(job)); 26 FOR_EACH_OBSERVER(JobObserver, observers_, OnJobAdded(job));
27 } 27 }
28 28
29 void URLRequestJobTracker::RemoveJob(URLRequestJob* job) { 29 void URLRequestJobTracker::RemoveJob(URLRequestJob* job) {
30 JobList::iterator iter = std::find(active_jobs_.begin(), active_jobs_.end(), 30 JobList::iterator iter = std::find(active_jobs_.begin(), active_jobs_.end(),
(...skipping 18 matching lines...) Expand all
49 FOR_EACH_OBSERVER(JobObserver, observers_, 49 FOR_EACH_OBSERVER(JobObserver, observers_,
50 OnJobRedirect(job, location, status_code)); 50 OnJobRedirect(job, location, status_code));
51 } 51 }
52 52
53 void URLRequestJobTracker::OnBytesRead(URLRequestJob* job, 53 void URLRequestJobTracker::OnBytesRead(URLRequestJob* job,
54 int byte_count) { 54 int byte_count) {
55 FOR_EACH_OBSERVER(JobObserver, observers_, 55 FOR_EACH_OBSERVER(JobObserver, observers_,
56 OnBytesRead(job, byte_count)); 56 OnBytesRead(job, byte_count));
57 } 57 }
58 58
OLDNEW
« no previous file with comments | « net/url_request/url_request_ftp_job.h ('k') | sandbox/sandbox_poc/pocdll/invasive.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698