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

Side by Side Diff: chromeos/network/dhcp_proxy_script_fetcher_chromeos.h

Issue 2845643003: Allow ProxyService to share URLRequestContext with everything else. (Closed)
Patch Set: Fix fetcher shutdown with no active request, add test, add comment 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 | « no previous file | chromeos/network/dhcp_proxy_script_fetcher_chromeos.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_ 5 #ifndef CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_
6 #define CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_ 6 #define CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 21 matching lines...) Expand all
32 : public net::DhcpProxyScriptFetcher { 32 : public net::DhcpProxyScriptFetcher {
33 public: 33 public:
34 explicit DhcpProxyScriptFetcherChromeos( 34 explicit DhcpProxyScriptFetcherChromeos(
35 net::URLRequestContext* url_request_context); 35 net::URLRequestContext* url_request_context);
36 ~DhcpProxyScriptFetcherChromeos() override; 36 ~DhcpProxyScriptFetcherChromeos() override;
37 37
38 // net::DhcpProxyScriptFetcher 38 // net::DhcpProxyScriptFetcher
39 int Fetch(base::string16* utf16_text, 39 int Fetch(base::string16* utf16_text,
40 const net::CompletionCallback& callback) override; 40 const net::CompletionCallback& callback) override;
41 void Cancel() override; 41 void Cancel() override;
42 void OnShutdown() override;
42 const GURL& GetPacURL() const override; 43 const GURL& GetPacURL() const override;
43 std::string GetFetcherName() const override; 44 std::string GetFetcherName() const override;
44 45
45 private: 46 private:
46 void ContinueFetch(base::string16* utf16_text, 47 void ContinueFetch(base::string16* utf16_text,
47 net::CompletionCallback callback, 48 net::CompletionCallback callback,
48 std::string pac_url); 49 std::string pac_url);
49 50
50 net::URLRequestContext* url_request_context_; // Weak ptr
51 std::unique_ptr<net::ProxyScriptFetcher> proxy_script_fetcher_; 51 std::unique_ptr<net::ProxyScriptFetcher> proxy_script_fetcher_;
52 scoped_refptr<base::SingleThreadTaskRunner> network_handler_task_runner_; 52 scoped_refptr<base::SingleThreadTaskRunner> network_handler_task_runner_;
53 53
54 GURL pac_url_; 54 GURL pac_url_;
55 55
56 base::WeakPtrFactory<DhcpProxyScriptFetcherChromeos> weak_ptr_factory_; 56 base::WeakPtrFactory<DhcpProxyScriptFetcherChromeos> weak_ptr_factory_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(DhcpProxyScriptFetcherChromeos); 58 DISALLOW_COPY_AND_ASSIGN(DhcpProxyScriptFetcherChromeos);
59 }; 59 };
60 60
61 } // namespace chromeos 61 } // namespace chromeos
62 62
63 #endif // CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_ 63 #endif // CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/network/dhcp_proxy_script_fetcher_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698