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

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

Issue 2866183003: Syntax and coverage checking added to Network Traffic Annotations. (Closed)
Patch Set: Protobuf build updated. Created 3 years, 7 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/traffic_annotation/network_traffic_annotation.h ('k') | net/url_request/url_request.h » ('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/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 {
11 11
12 URLFetcher::~URLFetcher() {} 12 URLFetcher::~URLFetcher() {}
13 13
14 // static 14 // static
15 std::unique_ptr<URLFetcher> URLFetcher::Create( 15 std::unique_ptr<URLFetcher> URLFetcher::Create(
16 const GURL& url, 16 const GURL& url,
17 URLFetcher::RequestType request_type, 17 URLFetcher::RequestType request_type,
18 URLFetcherDelegate* d) { 18 URLFetcherDelegate* d) {
19 return URLFetcher::Create(0, url, request_type, d); 19 return URLFetcher::Create(0, url, request_type, d);
20 } 20 }
21 21
22 // static 22 // static
23 std::unique_ptr<URLFetcher> URLFetcher::Create( 23 std::unique_ptr<URLFetcher> URLFetcher::Create(
24 int id, 24 int id,
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 return Create(id, url, request_type, d, NO_TRAFFIC_ANNOTATION_YET); 28 return Create(id, url, request_type, d, MISSING_TRAFFIC_ANNOTATION);
29 } 29 }
30 30
31 // static 31 // static
32 std::unique_ptr<URLFetcher> URLFetcher::Create( 32 std::unique_ptr<URLFetcher> URLFetcher::Create(
33 const GURL& url, 33 const GURL& url,
34 URLFetcher::RequestType request_type, 34 URLFetcher::RequestType request_type,
35 URLFetcherDelegate* d, 35 URLFetcherDelegate* d,
36 NetworkTrafficAnnotationTag traffic_annotation) { 36 NetworkTrafficAnnotationTag traffic_annotation) {
37 return URLFetcher::Create(0, url, request_type, d, traffic_annotation); 37 return URLFetcher::Create(0, url, request_type, d, traffic_annotation);
38 } 38 }
39 39
40 // static 40 // static
41 std::unique_ptr<URLFetcher> URLFetcher::Create( 41 std::unique_ptr<URLFetcher> URLFetcher::Create(
42 int id, 42 int id,
43 const GURL& url, 43 const GURL& url,
44 URLFetcher::RequestType request_type, 44 URLFetcher::RequestType request_type,
45 URLFetcherDelegate* d, 45 URLFetcherDelegate* d,
46 NetworkTrafficAnnotationTag traffic_annotation) { 46 NetworkTrafficAnnotationTag traffic_annotation) {
47 URLFetcherFactory* factory = URLFetcherImpl::factory(); 47 URLFetcherFactory* factory = URLFetcherImpl::factory();
48 // TODO(rhalavati@): Add annotation to CreateURLFetcher.
48 return factory ? factory->CreateURLFetcher(id, url, request_type, d) 49 return factory ? factory->CreateURLFetcher(id, url, request_type, d)
49 : std::unique_ptr<URLFetcher>(new URLFetcherImpl( 50 : std::unique_ptr<URLFetcher>(new URLFetcherImpl(
50 url, request_type, d, traffic_annotation)); 51 url, request_type, d, traffic_annotation));
51 } 52 }
52 53
53 // static 54 // static
54 void URLFetcher::CancelAll() { 55 void URLFetcher::CancelAll() {
55 URLFetcherImpl::CancelAll(); 56 URLFetcherImpl::CancelAll();
56 } 57 }
57 58
58 // static 59 // static
59 void URLFetcher::SetIgnoreCertificateRequests(bool ignored) { 60 void URLFetcher::SetIgnoreCertificateRequests(bool ignored) {
60 URLFetcherImpl::SetIgnoreCertificateRequests(ignored); 61 URLFetcherImpl::SetIgnoreCertificateRequests(ignored);
61 } 62 }
62 63
63 } // namespace net 64 } // namespace net
OLDNEW
« no previous file with comments | « net/traffic_annotation/network_traffic_annotation.h ('k') | net/url_request/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698