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

Side by Side Diff: net/url_request/url_fetcher_impl.h

Issue 2405483002: Make the request initiator Optional (Closed)
Patch Set: Addressed comments + rebase Created 4 years, 1 month 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_core.cc ('k') | net/url_request/url_fetcher_impl.cc » ('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 // This file contains URLFetcher, a wrapper around URLRequest that handles 5 // This file contains URLFetcher, a wrapper around URLRequest that handles
6 // low-level details like thread safety, ref counting, and incremental buffer 6 // low-level details like thread safety, ref counting, and incremental buffer
7 // reading. This is useful for callers who simply want to get the data from a 7 // reading. This is useful for callers who simply want to get the data from a
8 // URL and don't care about all the nitty-gritty details. 8 // URL and don't care about all the nitty-gritty details.
9 // 9 //
10 // NOTE(willchan): Only one "IO" thread is supported for URLFetcher. This is a 10 // NOTE(willchan): Only one "IO" thread is supported for URLFetcher. This is a
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 bool is_last_chunk) override; 54 bool is_last_chunk) override;
55 void SetLoadFlags(int load_flags) override; 55 void SetLoadFlags(int load_flags) override;
56 int GetLoadFlags() const override; 56 int GetLoadFlags() const override;
57 void SetReferrer(const std::string& referrer) override; 57 void SetReferrer(const std::string& referrer) override;
58 void SetReferrerPolicy(URLRequest::ReferrerPolicy referrer_policy) override; 58 void SetReferrerPolicy(URLRequest::ReferrerPolicy referrer_policy) override;
59 void SetExtraRequestHeaders( 59 void SetExtraRequestHeaders(
60 const std::string& extra_request_headers) override; 60 const std::string& extra_request_headers) override;
61 void AddExtraRequestHeader(const std::string& header_line) override; 61 void AddExtraRequestHeader(const std::string& header_line) override;
62 void SetRequestContext( 62 void SetRequestContext(
63 URLRequestContextGetter* request_context_getter) override; 63 URLRequestContextGetter* request_context_getter) override;
64 void SetInitiatorURL(const GURL& initiator) override; 64 void SetInitiator(const base::Optional<url::Origin>& initiator) override;
65 void SetURLRequestUserData( 65 void SetURLRequestUserData(
66 const void* key, 66 const void* key,
67 const CreateDataCallback& create_data_callback) override; 67 const CreateDataCallback& create_data_callback) override;
68 void SetStopOnRedirect(bool stop_on_redirect) override; 68 void SetStopOnRedirect(bool stop_on_redirect) override;
69 void SetAutomaticallyRetryOn5xx(bool retry) override; 69 void SetAutomaticallyRetryOn5xx(bool retry) override;
70 void SetMaxRetriesOn5xx(int max_retries) override; 70 void SetMaxRetriesOn5xx(int max_retries) override;
71 int GetMaxRetriesOn5xx() const override; 71 int GetMaxRetriesOn5xx() const override;
72 base::TimeDelta GetBackoffDelay() const override; 72 base::TimeDelta GetBackoffDelay() const override;
73 void SetAutomaticallyRetryOnNetworkChanges(int max_retries) override; 73 void SetAutomaticallyRetryOnNetworkChanges(int max_retries) override;
74 void SaveResponseToFileAtPath( 74 void SaveResponseToFileAtPath(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 static int GetNumFetcherCores(); 122 static int GetNumFetcherCores();
123 123
124 const scoped_refptr<URLFetcherCore> core_; 124 const scoped_refptr<URLFetcherCore> core_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl); 126 DISALLOW_COPY_AND_ASSIGN(URLFetcherImpl);
127 }; 127 };
128 128
129 } // namespace net 129 } // namespace net
130 130
131 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_ 131 #endif // NET_URL_REQUEST_URL_FETCHER_IMPL_H_
OLDNEW
« no previous file with comments | « net/url_request/url_fetcher_core.cc ('k') | net/url_request/url_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698