• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include <memory>
6 
7 #include "net/traffic_annotation/network_traffic_annotation.h"
8 
9 // This file provides all required dummy classes for:
10 // tools/clang/traffic_annotation_extractor/tests/test-original.cc
11 
12 class GURL {};
13 
14 namespace net {
15 
16 class URLRequest {
17  public:
18   class Delegate;
19 };
20 
21 class URLFetcherDelegate;
22 
23 enum RequestPriority { TEST_VALUE };
24 
25 class URLFetcher {
26  public:
27   enum RequestType { TEST_VALUE };
28 
29   static std::unique_ptr<URLFetcher> Create(
30       const GURL& url,
31       URLFetcher::RequestType request_type,
32       URLFetcherDelegate* d);
33 
34   static std::unique_ptr<URLFetcher> Create(
35       int id,
36       const GURL& url,
37       URLFetcher::RequestType request_type,
38       URLFetcherDelegate* d);
39 
40   static std::unique_ptr<URLFetcher> Create(
41       const GURL& url,
42       URLFetcher::RequestType request_type,
43       URLFetcherDelegate* d,
44       NetworkTrafficAnnotationTag traffic_annotation);
45 
46   static std::unique_ptr<URLFetcher> Create(
47       int id,
48       const GURL& url,
49       URLFetcher::RequestType request_type,
50       URLFetcherDelegate* d,
51       NetworkTrafficAnnotationTag traffic_annotation);
52 };
53 
54 class URLRequestContext {
55  public:
56   std::unique_ptr<URLRequest> CreateRequest(
57       const GURL& url,
58       RequestPriority priority,
59       URLRequest::Delegate* delegate) const;
60 
61   std::unique_ptr<URLRequest> CreateRequest(
62       const GURL& url,
63       RequestPriority priority,
64       URLRequest::Delegate* delegate,
65       NetworkTrafficAnnotationTag traffic_annotation) const;
66 };
67 
68 }  // namespace net