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

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

Issue 16434016: Rewrite scoped_ptr<T>(NULL) to use the default ctor in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/http/http_transaction_unittest.cc ('k') | net/quic/quic_stream_factory.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 #include "net/proxy/proxy_script_fetcher_impl.h" 5 #include "net/proxy/proxy_script_fetcher_impl.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/i18n/icu_string_conversions.h" 8 #include "base/i18n/icu_string_conversions.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 } // namespace 72 } // namespace
73 73
74 ProxyScriptFetcherImpl::ProxyScriptFetcherImpl( 74 ProxyScriptFetcherImpl::ProxyScriptFetcherImpl(
75 URLRequestContext* url_request_context) 75 URLRequestContext* url_request_context)
76 : weak_factory_(this), 76 : weak_factory_(this),
77 url_request_context_(url_request_context), 77 url_request_context_(url_request_context),
78 buf_(new IOBuffer(kBufSize)), 78 buf_(new IOBuffer(kBufSize)),
79 next_id_(0), 79 next_id_(0),
80 cur_request_(NULL),
81 cur_request_id_(0), 80 cur_request_id_(0),
82 result_code_(OK), 81 result_code_(OK),
83 result_text_(NULL), 82 result_text_(NULL),
84 max_response_bytes_(kDefaultMaxResponseBytes), 83 max_response_bytes_(kDefaultMaxResponseBytes),
85 max_duration_(base::TimeDelta::FromMilliseconds(kDefaultMaxDurationMs)) { 84 max_duration_(base::TimeDelta::FromMilliseconds(kDefaultMaxDurationMs)) {
86 DCHECK(url_request_context); 85 DCHECK(url_request_context);
87 } 86 }
88 87
89 ProxyScriptFetcherImpl::~ProxyScriptFetcherImpl() { 88 ProxyScriptFetcherImpl::~ProxyScriptFetcherImpl() {
90 // The URLRequest's destructor will cancel the outstanding request, and 89 // The URLRequest's destructor will cancel the outstanding request, and
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // is still applicable. 312 // is still applicable.
314 if (cur_request_id_ != id) 313 if (cur_request_id_ != id)
315 return; 314 return;
316 315
317 DCHECK(cur_request_.get()); 316 DCHECK(cur_request_.get());
318 result_code_ = ERR_TIMED_OUT; 317 result_code_ = ERR_TIMED_OUT;
319 cur_request_->Cancel(); 318 cur_request_->Cancel();
320 } 319 }
321 320
322 } // namespace net 321 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_transaction_unittest.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698