OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2281 const net::SSLInfo& ssl_info, | 2281 const net::SSLInfo& ssl_info, |
2282 const GURL& request_url, | 2282 const GURL& request_url, |
2283 ResourceType resource_type, | 2283 ResourceType resource_type, |
2284 bool overridable, | 2284 bool overridable, |
2285 bool strict_enforcement, | 2285 bool strict_enforcement, |
2286 bool expired_previous_decision, | 2286 bool expired_previous_decision, |
2287 const base::Callback<void(content::CertificateRequestResultType)>& | 2287 const base::Callback<void(content::CertificateRequestResultType)>& |
2288 callback) { | 2288 callback) { |
2289 DCHECK(web_contents); | 2289 DCHECK(web_contents); |
2290 if (resource_type != content::RESOURCE_TYPE_MAIN_FRAME) { | 2290 if (resource_type != content::RESOURCE_TYPE_MAIN_FRAME) { |
2291 // A sub-resource has a certificate error. The user doesn't really | 2291 // A sub-resource has a certificate error. The user doesn't really |
2292 // have a context for making the right decision, so block the | 2292 // have a context for making the right decision, so block the |
2293 // request hard, without an info bar to allow showing the insecure | 2293 // request hard, without an info bar to allow showing the insecure |
2294 // content. | 2294 // content. |
2295 if (!callback.is_null()) | 2295 if (!callback.is_null()) { |
irisu
2017/03/06 11:56:49
Ignore brackets. (Will fix when back on workstatio
| |
2296 callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY); | 2296 callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY); |
2297 } | |
2297 return; | 2298 return; |
2298 } | 2299 } |
2299 | 2300 |
2300 // If the tab is being prerendered, cancel the prerender and the request. | 2301 // If the tab is being prerendered, cancel the prerender and the request. |
2301 prerender::PrerenderContents* prerender_contents = | 2302 prerender::PrerenderContents* prerender_contents = |
2302 prerender::PrerenderContents::FromWebContents(web_contents); | 2303 prerender::PrerenderContents::FromWebContents(web_contents); |
2303 if (prerender_contents) { | 2304 if (prerender_contents) { |
2304 prerender_contents->Destroy(prerender::FINAL_STATUS_SSL_ERROR); | 2305 prerender_contents->Destroy(prerender::FINAL_STATUS_SSL_ERROR); |
2305 if (!callback.is_null()) { | 2306 if (!callback.is_null()) { |
2306 callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); | 2307 callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL); |
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3561 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3562 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3562 return variations::GetVariationParamValue( | 3563 return variations::GetVariationParamValue( |
3563 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3564 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3564 } | 3565 } |
3565 | 3566 |
3566 // static | 3567 // static |
3567 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3568 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3568 const storage::QuotaSettings* settings) { | 3569 const storage::QuotaSettings* settings) { |
3569 g_default_quota_settings = settings; | 3570 g_default_quota_settings = settings; |
3570 } | 3571 } |
OLD | NEW |