Fix error caused by refactor

This commit is contained in:
Cheng Zhao 2018-03-08 17:52:46 +09:00
parent 6df2326a30
commit 0abbedcdae
3 changed files with 2 additions and 8 deletions

View file

@ -174,7 +174,8 @@ void AtomBrowserClient::RenderProcessWillLaunch(
new WidevineCdmMessageFilter(process_id, host->GetBrowserContext()));
ProcessPreferences prefs;
auto* web_preferences = WebContentsPreferences::From(process_id);
auto* web_preferences = WebContentsPreferences::From(
GetWebContentsFromProcessID(process_id));
if (web_preferences) {
prefs.sandbox = web_preferences->IsEnabled("sandbox");
prefs.native_window_open = web_preferences->IsEnabled("nativeWindowOpen");

View file

@ -120,11 +120,6 @@ WebContentsPreferences* WebContentsPreferences::From(
return FromWebContents(web_contents);
}
// static
WebContentsPreferences* WebContentsPreferences::From(int process_id) {
return From(GetWebContentsFromProcessID(process_id));
}
void WebContentsPreferences::AppendCommandLineSwitches(
base::CommandLine* command_line) {
bool b;

View file

@ -31,8 +31,6 @@ class WebContentsPreferences
public:
// Get self from WebContents.
static WebContentsPreferences* From(content::WebContents* web_contents);
// Get self from procese ID.
static WebContentsPreferences* From(int process_id);
WebContentsPreferences(content::WebContents* web_contents,
const mate::Dictionary& web_preferences);