Avoid storing unrelated things in WebContentsPreferences

This commit is contained in:
Cheng Zhao 2015-11-11 10:32:25 +08:00
parent b807685453
commit ba457681b2
3 changed files with 17 additions and 9 deletions

View file

@ -269,9 +269,7 @@ WebContents::WebContents(v8::Isolate* isolate,
managed_web_contents()->GetView()->SetDelegate(this);
// Save the preferences in C++.
base::DictionaryValue web_preferences;
mate::ConvertFromV8(isolate, options.GetHandle(), &web_preferences);
new WebContentsPreferences(web_contents, &web_preferences);
new WebContentsPreferences(web_contents, options);
web_contents->SetUserAgentOverride(GetBrowserContext()->GetUserAgent());