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

Side by Side Diff: net/proxy/proxy_service.cc

Issue 368001: Second patch in making destructors of refcounted objects private. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
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 "net/proxy/proxy_service.h" 5 #include "net/proxy/proxy_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 results_->RemoveBadProxies(service_->proxy_retry_info_); 163 results_->RemoveBadProxies(service_->proxy_retry_info_);
164 164
165 LoadLog::EndEvent(load_log_, LoadLog::TYPE_PROXY_SERVICE); 165 LoadLog::EndEvent(load_log_, LoadLog::TYPE_PROXY_SERVICE);
166 166
167 return result_code; 167 return result_code;
168 } 168 }
169 169
170 LoadLog* load_log() const { return load_log_; } 170 LoadLog* load_log() const { return load_log_; }
171 171
172 private: 172 private:
173 friend class base::RefCounted<ProxyService::PacRequest>;
174
175 ~PacRequest() {}
176
173 // Callback for when the ProxyResolver request has completed. 177 // Callback for when the ProxyResolver request has completed.
174 void QueryComplete(int result_code) { 178 void QueryComplete(int result_code) {
175 result_code = QueryDidComplete(result_code); 179 result_code = QueryDidComplete(result_code);
176 180
177 // Remove this completed PacRequest from the service's pending list. 181 // Remove this completed PacRequest from the service's pending list.
178 /// (which will probably cause deletion of |this|). 182 /// (which will probably cause deletion of |this|).
179 CompletionCallback* callback = user_callback_; 183 CompletionCallback* callback = user_callback_;
180 service_->RemovePendingRequest(this); 184 service_->RemovePendingRequest(this);
181 185
182 callback->Run(result_code); 186 callback->Run(result_code);
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 OnCompletion(result_); 793 OnCompletion(result_);
790 } 794 }
791 } 795 }
792 796
793 void SyncProxyServiceHelper::OnCompletion(int rv) { 797 void SyncProxyServiceHelper::OnCompletion(int rv) {
794 result_ = rv; 798 result_ = rv;
795 event_.Signal(); 799 event_.Signal();
796 } 800 }
797 801
798 } // namespace net 802 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698