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

Side by Side Diff: net/url_request/url_fetcher.cc

Issue 2421333002: Protobuf for Traffic Annotation and first use by a URLFetcher. (Closed)
Patch Set: All comments addressed. Created 3 years, 10 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
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.h" 5 #include "net/url_request/url_fetcher.h"
6 6
7 #include "net/url_request/url_fetcher_factory.h" 7 #include "net/url_request/url_fetcher_factory.h"
8 #include "net/url_request/url_fetcher_impl.h" 8 #include "net/url_request/url_fetcher_impl.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 14 matching lines...) Expand all
25 const GURL& url, 25 const GURL& url,
26 URLFetcher::RequestType request_type, 26 URLFetcher::RequestType request_type,
27 URLFetcherDelegate* d) { 27 URLFetcherDelegate* d) {
28 URLFetcherFactory* factory = URLFetcherImpl::factory(); 28 URLFetcherFactory* factory = URLFetcherImpl::factory();
29 return factory ? factory->CreateURLFetcher(id, url, request_type, d) 29 return factory ? factory->CreateURLFetcher(id, url, request_type, d)
30 : std::unique_ptr<URLFetcher>( 30 : std::unique_ptr<URLFetcher>(
31 new URLFetcherImpl(url, request_type, d)); 31 new URLFetcherImpl(url, request_type, d));
32 } 32 }
33 33
34 // static 34 // static
35 std::unique_ptr<URLFetcher> URLFetcher::Create(
36 const GURL& url,
37 URLFetcher::RequestType request_type,
38 URLFetcherDelegate* d,
39 NetworkTrafficAnnotationTag traffic_annotation) {
40 // traffic_annotation is just a tag that is extracted during static
41 // code analysis and can be ignored here.
asanka 2017/01/26 20:59:28 unnecessary since we are passing |traffic_annotati
Ramin Halavati 2017/01/27 07:48:58 Done.
42 return URLFetcher::Create(0, url, request_type, d, traffic_annotation);
43 }
44
45 // static
46 std::unique_ptr<URLFetcher> URLFetcher::Create(
47 int id,
48 const GURL& url,
49 URLFetcher::RequestType request_type,
50 URLFetcherDelegate* d,
51 NetworkTrafficAnnotationTag traffic_annotation) {
52 // traffic_annotation is just a tag that is extracted during static
53 // code analysis and can be ignored here.
54 return Create(id, url, request_type, d);
55 }
56
57 // static
35 void URLFetcher::CancelAll() { 58 void URLFetcher::CancelAll() {
36 URLFetcherImpl::CancelAll(); 59 URLFetcherImpl::CancelAll();
37 } 60 }
38 61
39 // static 62 // static
40 void URLFetcher::SetIgnoreCertificateRequests(bool ignored) { 63 void URLFetcher::SetIgnoreCertificateRequests(bool ignored) {
41 URLFetcherImpl::SetIgnoreCertificateRequests(ignored); 64 URLFetcherImpl::SetIgnoreCertificateRequests(ignored);
42 } 65 }
43 66
44 } // namespace net 67 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698