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/ssl/ssl_blocking_page.h" | 5 #include "chrome/browser/ssl/ssl_blocking_page.h" |
6 | 6 |
7 #include "base/build_time.h" | 7 #include "base/build_time.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/i18n/time_formatting.h" | 10 #include "base/i18n/time_formatting.h" |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 SSLBlockingPage::SSLBlockingPage(content::WebContents* web_contents, | 306 SSLBlockingPage::SSLBlockingPage(content::WebContents* web_contents, |
307 int cert_error, | 307 int cert_error, |
308 const net::SSLInfo& ssl_info, | 308 const net::SSLInfo& ssl_info, |
309 const GURL& request_url, | 309 const GURL& request_url, |
310 int options_mask, | 310 int options_mask, |
311 const base::Callback<void(bool)>& callback) | 311 const base::Callback<void(bool)>& callback) |
312 : SecurityInterstitialPage(web_contents, request_url), | 312 : SecurityInterstitialPage(web_contents, request_url), |
313 callback_(callback), | 313 callback_(callback), |
314 cert_error_(cert_error), | 314 cert_error_(cert_error), |
315 ssl_info_(ssl_info), | 315 ssl_info_(ssl_info), |
316 overridable_(options_mask & OVERRIDABLE && | 316 overridable_(IsOverridable(options_mask)), |
317 !(options_mask & STRICT_ENFORCEMENT)), | |
318 strict_enforcement_((options_mask & STRICT_ENFORCEMENT) != 0), | 317 strict_enforcement_((options_mask & STRICT_ENFORCEMENT) != 0), |
319 internal_(false), | 318 internal_(false), |
320 num_visits_(-1), | 319 num_visits_(-1), |
321 expired_but_previously_allowed_( | 320 expired_but_previously_allowed_( |
322 (options_mask & EXPIRED_BUT_PREVIOUSLY_ALLOWED) != 0) { | 321 (options_mask & EXPIRED_BUT_PREVIOUSLY_ALLOWED) != 0) { |
323 Profile* profile = Profile::FromBrowserContext( | 322 Profile* profile = Profile::FromBrowserContext( |
324 web_contents->GetBrowserContext()); | 323 web_contents->GetBrowserContext()); |
325 // For UMA stats. | 324 // For UMA stats. |
326 if (net::IsHostnameNonUnique(request_url.HostNoBrackets())) | 325 if (net::IsHostnameNonUnique(request_url.HostNoBrackets())) |
327 internal_ = true; | 326 internal_ = true; |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 for (; i < 5; i++) { | 657 for (; i < 5; i++) { |
659 strings->SetString(keys[i], std::string()); | 658 strings->SetString(keys[i], std::string()); |
660 } | 659 } |
661 } | 660 } |
662 | 661 |
663 void SSLBlockingPage::OnGotHistoryCount(bool success, | 662 void SSLBlockingPage::OnGotHistoryCount(bool success, |
664 int num_visits, | 663 int num_visits, |
665 base::Time first_visit) { | 664 base::Time first_visit) { |
666 num_visits_ = num_visits; | 665 num_visits_ = num_visits; |
667 } | 666 } |
OLD | NEW |