Fix API changes
This commit is contained in:
parent
5e004b4c24
commit
38a211db2e
8 changed files with 19 additions and 24 deletions
|
@ -29,19 +29,19 @@ std::string PathWithoutParams(const std::string& path) {
|
|||
|
||||
std::string GetMimeTypeForPath(const std::string& path) {
|
||||
std::string filename = PathWithoutParams(path);
|
||||
if (EndsWith(filename, ".html", false)) {
|
||||
if (base::EndsWith(filename, ".html", false)) {
|
||||
return "text/html";
|
||||
} else if (EndsWith(filename, ".css", false)) {
|
||||
} else if (base::EndsWith(filename, ".css", false)) {
|
||||
return "text/css";
|
||||
} else if (EndsWith(filename, ".js", false)) {
|
||||
} else if (base::EndsWith(filename, ".js", false)) {
|
||||
return "application/javascript";
|
||||
} else if (EndsWith(filename, ".png", false)) {
|
||||
} else if (base::EndsWith(filename, ".png", false)) {
|
||||
return "image/png";
|
||||
} else if (EndsWith(filename, ".gif", false)) {
|
||||
} else if (base::EndsWith(filename, ".gif", false)) {
|
||||
return "image/gif";
|
||||
} else if (EndsWith(filename, ".svg", false)) {
|
||||
} else if (base::EndsWith(filename, ".svg", false)) {
|
||||
return "image/svg+xml";
|
||||
} else if (EndsWith(filename, ".manifest", false)) {
|
||||
} else if (base::EndsWith(filename, ".manifest", false)) {
|
||||
return "text/cache-manifest";
|
||||
}
|
||||
return "text/html";
|
||||
|
|
|
@ -282,13 +282,13 @@ void InspectableWebContentsImpl::CallClientFunction(const std::string& function_
|
|||
std::string javascript = function_name + "(";
|
||||
if (arg1) {
|
||||
std::string json;
|
||||
base::JSONWriter::Write(arg1, &json);
|
||||
base::JSONWriter::Write(*arg1, &json);
|
||||
javascript.append(json);
|
||||
if (arg2) {
|
||||
base::JSONWriter::Write(arg2, &json);
|
||||
base::JSONWriter::Write(*arg2, &json);
|
||||
javascript.append(", ").append(json);
|
||||
if (arg3) {
|
||||
base::JSONWriter::Write(arg3, &json);
|
||||
base::JSONWriter::Write(*arg3, &json);
|
||||
javascript.append(", ").append(json);
|
||||
}
|
||||
}
|
||||
|
@ -586,7 +586,7 @@ bool InspectableWebContentsImpl::ShouldCreateWebContents(
|
|||
int route_id,
|
||||
int main_frame_route_id,
|
||||
WindowContainerType window_container_type,
|
||||
const base::string16& frame_name,
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
content::SessionStorageNamespace* session_storage_namespace) {
|
||||
|
|
|
@ -143,7 +143,7 @@ class InspectableWebContentsImpl :
|
|||
int route_id,
|
||||
int main_frame_route_id,
|
||||
WindowContainerType window_container_type,
|
||||
const base::string16& frame_name,
|
||||
const std::string& frame_name,
|
||||
const GURL& target_url,
|
||||
const std::string& partition_id,
|
||||
content::SessionStorageNamespace* session_storage_namespace) override;
|
||||
|
|
|
@ -129,11 +129,6 @@ bool NetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
|
|||
return true;
|
||||
}
|
||||
|
||||
bool NetworkDelegate::OnCanThrottleRequest(
|
||||
const net::URLRequest& request) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool NetworkDelegate::OnCanEnablePrivacyMode(
|
||||
const GURL& url,
|
||||
const GURL& first_party_for_cookies) const {
|
||||
|
|
|
@ -61,7 +61,6 @@ class NetworkDelegate : public net::NetworkDelegate {
|
|||
net::CookieOptions* options) override;
|
||||
bool OnCanAccessFile(const net::URLRequest& request,
|
||||
const base::FilePath& path) const override;
|
||||
bool OnCanThrottleRequest(const net::URLRequest& request) const override;
|
||||
bool OnCanEnablePrivacyMode(
|
||||
const GURL& url,
|
||||
const GURL& first_party_for_cookies) const override;
|
||||
|
|
|
@ -17,7 +17,7 @@ PermissionManager::~PermissionManager() {
|
|||
|
||||
void PermissionManager::RequestPermission(
|
||||
content::PermissionType permission,
|
||||
content::WebContents* web_contents,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
int request_id,
|
||||
const GURL& requesting_origin,
|
||||
bool user_gesture,
|
||||
|
@ -27,7 +27,7 @@ void PermissionManager::RequestPermission(
|
|||
|
||||
void PermissionManager::CancelPermissionRequest(
|
||||
content::PermissionType permission,
|
||||
content::WebContents* web_contents,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
int request_id,
|
||||
const GURL& requesting_origin) {
|
||||
}
|
||||
|
|
|
@ -19,13 +19,13 @@ class PermissionManager : public content::PermissionManager {
|
|||
// content::PermissionManager:
|
||||
void RequestPermission(
|
||||
content::PermissionType permission,
|
||||
content::WebContents* web_contents,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
int request_id,
|
||||
const GURL& requesting_origin,
|
||||
bool user_gesture,
|
||||
const base::Callback<void(content::PermissionStatus)>& callback) override;
|
||||
void CancelPermissionRequest(content::PermissionType permission,
|
||||
content::WebContents* web_contents,
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
int request_id,
|
||||
const GURL& requesting_origin) override;
|
||||
void ResetPermission(content::PermissionType permission,
|
||||
|
|
|
@ -143,7 +143,7 @@ URLRequestContextGetter::URLRequestContextGetter(
|
|||
// must synchronously run on the glib message loop. This will be passed to
|
||||
// the URLRequestContextStorage on the IO thread in GetURLRequestContext().
|
||||
proxy_config_service_.reset(net::ProxyService::CreateSystemProxyConfigService(
|
||||
io_loop_->message_loop_proxy(), file_loop_->message_loop_proxy()));
|
||||
io_loop_->task_runner(), file_loop_->task_runner()));
|
||||
}
|
||||
|
||||
URLRequestContextGetter::~URLRequestContextGetter() {
|
||||
|
@ -233,7 +233,8 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
|
|||
url_sec_mgr_.get(),
|
||||
host_resolver.get(),
|
||||
std::string(), // gssapi_library_name
|
||||
false, // negotiate_disable_cname_lookup
|
||||
std::string(), // gssapi_library_nam
|
||||
false, // auth_android_negotiate_account_type
|
||||
true); // negotiate_enable_port
|
||||
|
||||
storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
|
||||
|
|
Loading…
Reference in a new issue