forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use URLRequestContextBuilderMojo to create the SystemURLRequestContext.
Also adds a DhcpProxyScriptFetcherFactoryChromeos, to inject into the URLRequestContextBuilder on ChromeOS (The actual fetcher must be created after the URLRequestContext, and the factory avoids the whole chicken/egg thing). BUG=715695 Review-Url: https://codereview.chromium.org/2929153002 Cr-Commit-Position: refs/heads/master@{#479854}
- Loading branch information
mmenke
authored and
Commit Bot
committed
Jun 15, 2017
1 parent
05e4e6c
commit 14085ad
Showing
13 changed files
with
159 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
chromeos/network/dhcp_proxy_script_fetcher_factory_chromeos.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "chromeos/network/dhcp_proxy_script_fetcher_factory_chromeos.h" | ||
|
||
#include "base/memory/ptr_util.h" | ||
#include "chromeos/network/dhcp_proxy_script_fetcher_chromeos.h" | ||
|
||
namespace chromeos { | ||
|
||
DhcpProxyScriptFetcherFactoryChromeos::DhcpProxyScriptFetcherFactoryChromeos() { | ||
} | ||
|
||
DhcpProxyScriptFetcherFactoryChromeos:: | ||
~DhcpProxyScriptFetcherFactoryChromeos() {} | ||
|
||
std::unique_ptr<net::DhcpProxyScriptFetcher> | ||
DhcpProxyScriptFetcherFactoryChromeos::Create( | ||
net::URLRequestContext* url_request_context) { | ||
return base::MakeUnique<DhcpProxyScriptFetcherChromeos>(url_request_context); | ||
} | ||
|
||
} // namespace chromeos |
40 changes: 40 additions & 0 deletions
40
chromeos/network/dhcp_proxy_script_fetcher_factory_chromeos.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright 2017 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_FACTORY_CHROMEOS_H_ | ||
#define CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_FACTORY_CHROMEOS_H_ | ||
|
||
#include <memory> | ||
|
||
#include "base/macros.h" | ||
#include "chromeos/chromeos_export.h" | ||
#include "net/proxy/dhcp_proxy_script_fetcher_factory.h" | ||
|
||
namespace net { | ||
class DhcpProxyScriptFetcher; | ||
class URLRequestContext; | ||
} | ||
|
||
namespace chromeos { | ||
|
||
// ChromeOS specific implementation of DhcpProxyScriptFetcherFactory. | ||
// TODO(mmenke): This won't work at all with an out-of-process network service. | ||
// Figure out a way forward there. | ||
class CHROMEOS_EXPORT DhcpProxyScriptFetcherFactoryChromeos | ||
: public net::DhcpProxyScriptFetcherFactory { | ||
public: | ||
DhcpProxyScriptFetcherFactoryChromeos(); | ||
~DhcpProxyScriptFetcherFactoryChromeos() override; | ||
|
||
// net::DhcpProxyScriptFetcherFactory implementation. | ||
std::unique_ptr<net::DhcpProxyScriptFetcher> Create( | ||
net::URLRequestContext* url_request_context) override; | ||
|
||
private: | ||
DISALLOW_COPY_AND_ASSIGN(DhcpProxyScriptFetcherFactoryChromeos); | ||
}; | ||
|
||
} // namespace chromeos | ||
|
||
#endif // CHROMEOS_NETWORK_DHCP_PROXY_SCRIPT_FETCHER_FACTORY_CHROMEOS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.