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

Side by Side Diff: net/proxy/proxy_script_fetcher_impl.h

Issue 506523002: net : Declaring the weak_ptr_factory in proper order. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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
« no previous file with comments | « net/http/http_transaction_test_util.cc ('k') | net/proxy/proxy_script_fetcher_impl.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ 5 #ifndef NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_
6 #define NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ 6 #define NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Called once the request has completed to notify the caller of 72 // Called once the request has completed to notify the caller of
73 // |response_code_| and |response_text_|. 73 // |response_code_| and |response_text_|.
74 void FetchCompleted(); 74 void FetchCompleted();
75 75
76 // Clear out the state for the current request. 76 // Clear out the state for the current request.
77 void ResetCurRequestState(); 77 void ResetCurRequestState();
78 78
79 // Callback for time-out task of request with id |id|. 79 // Callback for time-out task of request with id |id|.
80 void OnTimeout(int id); 80 void OnTimeout(int id);
81 81
82 // Factory for creating the time-out task. This takes care of revoking
83 // outstanding tasks when |this| is deleted.
84 base::WeakPtrFactory<ProxyScriptFetcherImpl> weak_factory_;
85
86 // The context used for making network requests. 82 // The context used for making network requests.
87 URLRequestContext* const url_request_context_; 83 URLRequestContext* const url_request_context_;
88 84
89 // Buffer that URLRequest writes into. 85 // Buffer that URLRequest writes into.
90 scoped_refptr<IOBuffer> buf_; 86 scoped_refptr<IOBuffer> buf_;
91 87
92 // The next ID to use for |cur_request_| (monotonically increasing). 88 // The next ID to use for |cur_request_| (monotonically increasing).
93 int next_id_; 89 int next_id_;
94 90
95 // The current (in progress) request, or NULL. 91 // The current (in progress) request, or NULL.
(...skipping 16 matching lines...) Expand all
112 // This buffer is owned by the owner of |callback|, and will be filled with 108 // This buffer is owned by the owner of |callback|, and will be filled with
113 // UTF16 response on completion. 109 // UTF16 response on completion.
114 base::string16* result_text_; 110 base::string16* result_text_;
115 111
116 // The maximum number of bytes to allow in responses. 112 // The maximum number of bytes to allow in responses.
117 size_t max_response_bytes_; 113 size_t max_response_bytes_;
118 114
119 // The maximum amount of time to wait for download to complete. 115 // The maximum amount of time to wait for download to complete.
120 base::TimeDelta max_duration_; 116 base::TimeDelta max_duration_;
121 117
118 // Factory for creating the time-out task. This takes care of revoking
119 // outstanding tasks when |this| is deleted.
120 base::WeakPtrFactory<ProxyScriptFetcherImpl> weak_factory_;
121
122 DISALLOW_COPY_AND_ASSIGN(ProxyScriptFetcherImpl); 122 DISALLOW_COPY_AND_ASSIGN(ProxyScriptFetcherImpl);
123 }; 123 };
124 124
125 } // namespace net 125 } // namespace net
126 126
127 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_ 127 #endif // NET_PROXY_PROXY_SCRIPT_FETCHER_IMPL_H_
OLDNEW
« no previous file with comments | « net/http/http_transaction_test_util.cc ('k') | net/proxy/proxy_script_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698