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

Side by Side Diff: net/cert_net/cert_net_fetcher_impl.cc

Issue 2738513006: Add error initialization for network request class (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // Overview 5 // Overview
6 // 6 //
7 // The main entry point is CertNetFetcherImpl. This is an implementation of 7 // The main entry point is CertNetFetcherImpl. This is an implementation of
8 // CertNetFetcher that provides a service for fetching network requests. 8 // CertNetFetcher that provides a service for fetching network requests.
9 // 9 //
10 // The interface for CertNetFetcher is synchronous, however allows 10 // The interface for CertNetFetcher is synchronous, however allows
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 DCHECK(!job_); 252 DCHECK(!job_);
253 } 253 }
254 254
255 // A non-owned pointer to the job that is executing the request. 255 // A non-owned pointer to the job that is executing the request.
256 Job* job_ = nullptr; 256 Job* job_ = nullptr;
257 257
258 // May be written to from network thread, or from the caller thread only when 258 // May be written to from network thread, or from the caller thread only when
259 // there is no work that will be done on the network thread (e.g. when the 259 // there is no work that will be done on the network thread (e.g. when the
260 // network thread has been shutdown before the request begins). See comment in 260 // network thread has been shutdown before the request begins). See comment in
261 // SignalImmediateError. 261 // SignalImmediateError.
262 Error error_; 262 Error error_ = OK;
263 std::vector<uint8_t> bytes_; 263 std::vector<uint8_t> bytes_;
264 264
265 // Indicates when |error_| and |bytes_| have been written to. 265 // Indicates when |error_| and |bytes_| have been written to.
266 base::WaitableEvent completion_event_; 266 base::WaitableEvent completion_event_;
267 267
268 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 268 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
269 269
270 DISALLOW_COPY_AND_ASSIGN(RequestCore); 270 DISALLOW_COPY_AND_ASSIGN(RequestCore);
271 }; 271 };
272 272
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 std::unique_ptr<AsyncCertNetFetcherImpl> impl_; 784 std::unique_ptr<AsyncCertNetFetcherImpl> impl_;
785 }; 785 };
786 786
787 } // namespace 787 } // namespace
788 788
789 scoped_refptr<CertNetFetcher> CreateCertNetFetcher(URLRequestContext* context) { 789 scoped_refptr<CertNetFetcher> CreateCertNetFetcher(URLRequestContext* context) {
790 return make_scoped_refptr(new CertNetFetcherImpl(context)); 790 return make_scoped_refptr(new CertNetFetcherImpl(context));
791 } 791 }
792 792
793 } // namespace net 793 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698