Adapt to changes of Chrome 51 API changes (Part 2)

This commit is contained in:
Cheng Zhao 2016-05-23 12:28:59 +09:00
parent 7ba391da7c
commit a2bd55dd3c
48 changed files with 131 additions and 131 deletions

View file

@ -190,7 +190,7 @@ class ResolveProxyHelper {
// Start the request.
int result = proxy_service->ResolveProxy(
url, net::LOAD_NORMAL, &proxy_info_, completion_callback,
url, "GET", net::LOAD_NORMAL, &proxy_info_, completion_callback,
&pac_req_, nullptr, net::BoundNetLog());
// Completed synchronously.

View file

@ -261,8 +261,9 @@ WebContents::WebContents(v8::Isolate* isolate,
content::WebContents* web_contents;
if (is_guest) {
content::SiteInstance* site_instance = content::SiteInstance::CreateForURL(
session->browser_context(), GURL("chrome-guest://fake-host"));
scoped_refptr<content::SiteInstance> site_instance =
content::SiteInstance::CreateForURL(
session->browser_context(), GURL("chrome-guest://fake-host"));
content::WebContents::CreateParams params(
session->browser_context(), site_instance);
guest_delegate_.reset(new WebViewGuestDelegate);

View file

@ -129,7 +129,8 @@ void AtomBrowserClient::OverrideSiteInstanceForNavigation(
if (url.SchemeIs(url::kJavaScriptScheme))
return;
*new_instance = content::SiteInstance::CreateForURL(browser_context, url);
*new_instance =
content::SiteInstance::CreateForURL(browser_context, url).get();
// Remember the original renderer process of the pending renderer process.
auto current_process = current_instance->GetProcess();

View file

@ -26,7 +26,7 @@ void AtomJavaScriptDialogManager::RunBeforeUnloadDialog(
bool is_reload,
const DialogClosedCallback& callback) {
// FIXME(zcbenz): the |message_text| is removed, figure out what should we do.
callback.Run(true);
callback.Run(true, base::ASCIIToUTF16("FIXME"));
}
} // namespace atom

View file

@ -37,10 +37,11 @@ LoginHandler::LoginHandler(net::AuthChallengeInfo* auth_info,
render_frame_id_(0) {
content::ResourceRequestInfo::ForRequest(request_)->GetAssociatedRenderFrame(
&render_process_host_id_, &render_frame_id_);
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&Browser::RequestLogin,
base::Unretained(Browser::Get()),
make_scoped_refptr(this)));
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&Browser::RequestLogin,
base::Unretained(Browser::Get()),
base::RetainedRef(make_scoped_refptr(this))));
}
LoginHandler::~LoginHandler() {

View file

@ -34,8 +34,8 @@ void OnPointerLockResponse(content::WebContents* web_contents, bool allowed) {
}
void OnPermissionResponse(const base::Callback<void(bool)>& callback,
content::PermissionStatus status) {
if (status == content::PermissionStatus::GRANTED)
blink::mojom::PermissionStatus status) {
if (status == blink::mojom::PermissionStatus::GRANTED)
callback.Run(true);
else
callback.Run(false);