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

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

Issue 2639203003: Add certificate error handling to devtools. (Closed)
Patch Set: Fix nits 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
« no previous file with comments | « no previous file | content/browser/devtools/protocol/devtools_protocol_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2288 matching lines...) Expand 10 before | Expand all | Expand 10 after
2299 const net::SSLInfo& ssl_info, 2299 const net::SSLInfo& ssl_info,
2300 const GURL& request_url, 2300 const GURL& request_url,
2301 ResourceType resource_type, 2301 ResourceType resource_type,
2302 bool overridable, 2302 bool overridable,
2303 bool strict_enforcement, 2303 bool strict_enforcement,
2304 bool expired_previous_decision, 2304 bool expired_previous_decision,
2305 const base::Callback<void(content::CertificateRequestResultType)>& 2305 const base::Callback<void(content::CertificateRequestResultType)>&
2306 callback) { 2306 callback) {
2307 DCHECK(web_contents); 2307 DCHECK(web_contents);
2308 if (resource_type != content::RESOURCE_TYPE_MAIN_FRAME) { 2308 if (resource_type != content::RESOURCE_TYPE_MAIN_FRAME) {
2309 // A sub-resource has a certificate error. The user doesn't really 2309 // A sub-resource has a certificate error. The user doesn't really
2310 // have a context for making the right decision, so block the 2310 // have a context for making the right decision, so block the
2311 // request hard, without an info bar to allow showing the insecure 2311 // request hard, without an info bar to allow showing the insecure
2312 // content. 2312 // content.
2313 if (!callback.is_null()) 2313 if (!callback.is_null())
2314 callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY); 2314 callback.Run(content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY);
2315 return; 2315 return;
2316 } 2316 }
2317 2317
2318 // If the tab is being prerendered, cancel the prerender and the request. 2318 // If the tab is being prerendered, cancel the prerender and the request.
2319 prerender::PrerenderContents* prerender_contents = 2319 prerender::PrerenderContents* prerender_contents =
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
3565 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3565 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3566 return variations::GetVariationParamValue( 3566 return variations::GetVariationParamValue(
3567 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3567 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3568 } 3568 }
3569 3569
3570 // static 3570 // static
3571 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3571 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3572 const storage::QuotaSettings* settings) { 3572 const storage::QuotaSettings* settings) {
3573 g_default_quota_settings = settings; 3573 g_default_quota_settings = settings;
3574 } 3574 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/devtools/protocol/devtools_protocol_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698