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

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: More comments added. 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
« no previous file with comments | « net/url_request/url_fetcher.h ('k') | net/url_request/url_request_context.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 {
(...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 return URLFetcher::Create(0, url, request_type, d, traffic_annotation);
41 }
42
43 // static
44 std::unique_ptr<URLFetcher> URLFetcher::Create(
45 int id,
46 const GURL& url,
47 URLFetcher::RequestType request_type,
48 URLFetcherDelegate* d,
49 NetworkTrafficAnnotationTag traffic_annotation) {
50 // traffic_annotation is just a tag that is extracted during static
51 // code analysis and can be ignored here.
52 return Create(id, url, request_type, d);
53 }
54
55 // static
35 void URLFetcher::CancelAll() { 56 void URLFetcher::CancelAll() {
36 URLFetcherImpl::CancelAll(); 57 URLFetcherImpl::CancelAll();
37 } 58 }
38 59
39 // static 60 // static
40 void URLFetcher::SetIgnoreCertificateRequests(bool ignored) { 61 void URLFetcher::SetIgnoreCertificateRequests(bool ignored) {
41 URLFetcherImpl::SetIgnoreCertificateRequests(ignored); 62 URLFetcherImpl::SetIgnoreCertificateRequests(ignored);
42 } 63 }
43 64
44 } // namespace net 65 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_fetcher.h ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698