Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2639203003: Add certificate error handling to devtools. (Closed)
Patch Set: Fix tests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after
2286 const net::SSLInfo& ssl_info, 2286 const net::SSLInfo& ssl_info,
2287 const GURL& request_url, 2287 const GURL& request_url,
2288 ResourceType resource_type, 2288 ResourceType resource_type,
2289 bool overridable, 2289 bool overridable,
2290 bool strict_enforcement, 2290 bool strict_enforcement,
2291 bool expired_previous_decision, 2291 bool expired_previous_decision,
2292 const base::Callback<void(content::CertificateRequestResultType)>& 2292 const base::Callback<void(content::CertificateRequestResultType)>&
2293 callback) { 2293 callback) {
2294 DCHECK(web_contents); 2294 DCHECK(web_contents);
2295 if (resource_type != content::RESOURCE_TYPE_MAIN_FRAME) { 2295 if (resource_type != content::RESOURCE_TYPE_MAIN_FRAME) {
2296 // A sub-resource has a certificate error. The user doesn't really 2296 // A sub-resource has a certificate error. The user doesn't really
2297 // have a context for making the right decision, so block the 2297 // have a context for making the right decision, so block the
2298 // request hard, without an info bar to allow showing the insecure 2298 // request hard, without an info bar to allow showing the insecure
2299 // content. 2299 // content.
2300 if (!callback.is_null()) 2300 if (!callback.is_null())
2301 callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY); 2301 callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY);
2302 return; 2302 return;
2303 } 2303 }
2304 2304
2305 // If the tab is being prerendered, cancel the prerender and the request. 2305 // If the tab is being prerendered, cancel the prerender and the request.
2306 prerender::PrerenderContents* prerender_contents = 2306 prerender::PrerenderContents* prerender_contents =
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
3551 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3551 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3552 return variations::GetVariationParamValue( 3552 return variations::GetVariationParamValue(
3553 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3553 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3554 } 3554 }
3555 3555
3556 // static 3556 // static
3557 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3557 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3558 const storage::QuotaSettings* settings) { 3558 const storage::QuotaSettings* settings) {
3559 g_default_quota_settings = settings; 3559 g_default_quota_settings = settings;
3560 } 3560 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698