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

Side by Side Diff: net/url_request/url_fetcher_core.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
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/url_request/url_fetcher_core.h" 5 #include "net/url_request/url_fetcher_core.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 URLFetcherCore::g_registry = LAZY_INSTANCE_INITIALIZER; 62 URLFetcherCore::g_registry = LAZY_INSTANCE_INITIALIZER;
63 63
64 URLFetcherCore::URLFetcherCore(URLFetcher* fetcher, 64 URLFetcherCore::URLFetcherCore(URLFetcher* fetcher,
65 const GURL& original_url, 65 const GURL& original_url,
66 URLFetcher::RequestType request_type, 66 URLFetcher::RequestType request_type,
67 URLFetcherDelegate* d) 67 URLFetcherDelegate* d)
68 : fetcher_(fetcher), 68 : fetcher_(fetcher),
69 original_url_(original_url), 69 original_url_(original_url),
70 request_type_(request_type), 70 request_type_(request_type),
71 delegate_(d), 71 delegate_(d),
72 delegate_task_runner_( 72 delegate_task_runner_(base::ThreadTaskRunnerHandle::Get()),
73 base::ThreadTaskRunnerHandle::Get()),
74 request_(NULL),
75 load_flags_(LOAD_NORMAL), 73 load_flags_(LOAD_NORMAL),
76 response_code_(URLFetcher::RESPONSE_CODE_INVALID), 74 response_code_(URLFetcher::RESPONSE_CODE_INVALID),
77 buffer_(new IOBuffer(kBufferSize)), 75 buffer_(new IOBuffer(kBufferSize)),
78 url_request_data_key_(NULL), 76 url_request_data_key_(NULL),
79 was_fetched_via_proxy_(false), 77 was_fetched_via_proxy_(false),
80 upload_content_set_(false), 78 upload_content_set_(false),
81 upload_range_offset_(0), 79 upload_range_offset_(0),
82 upload_range_length_(0), 80 upload_range_length_(0),
83 is_chunked_upload_(false), 81 is_chunked_upload_(false),
84 was_cancelled_(false), 82 was_cancelled_(false),
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 } 929 }
932 930
933 void URLFetcherCore::InformDelegateDownloadDataInDelegateThread( 931 void URLFetcherCore::InformDelegateDownloadDataInDelegateThread(
934 scoped_ptr<std::string> download_data) { 932 scoped_ptr<std::string> download_data) {
935 DCHECK(delegate_task_runner_->BelongsToCurrentThread()); 933 DCHECK(delegate_task_runner_->BelongsToCurrentThread());
936 if (delegate_) 934 if (delegate_)
937 delegate_->OnURLFetchDownloadData(fetcher_, download_data.Pass()); 935 delegate_->OnURLFetchDownloadData(fetcher_, download_data.Pass());
938 } 936 }
939 937
940 } // namespace net 938 } // namespace net
OLDNEW
« no previous file with comments | « net/test/embedded_test_server/embedded_test_server.cc ('k') | net/url_request/url_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698