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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 // For UMA stats. | 343 // For UMA stats. |
344 if (SSLErrorClassification::IsHostnameNonUniqueOrDotless( | 344 if (SSLErrorClassification::IsHostnameNonUniqueOrDotless( |
345 request_url.HostNoBrackets())) | 345 request_url.HostNoBrackets())) |
346 internal_ = true; | 346 internal_ = true; |
347 RecordSSLBlockingPageEventStats(SHOW_ALL); | 347 RecordSSLBlockingPageEventStats(SHOW_ALL); |
348 if (overridable_) { | 348 if (overridable_) { |
349 RecordSSLBlockingPageEventStats(SHOW_OVERRIDABLE); | 349 RecordSSLBlockingPageEventStats(SHOW_OVERRIDABLE); |
350 if (internal_) | 350 if (internal_) |
351 RecordSSLBlockingPageEventStats(SHOW_INTERNAL_HOSTNAME); | 351 RecordSSLBlockingPageEventStats(SHOW_INTERNAL_HOSTNAME); |
352 HistoryService* history_service = HistoryServiceFactory::GetForProfile( | 352 HistoryService* history_service = HistoryServiceFactory::GetForProfile( |
353 profile, Profile::EXPLICIT_ACCESS); | 353 profile, ServiceAccessType::EXPLICIT_ACCESS); |
354 if (history_service) { | 354 if (history_service) { |
355 history_service->GetVisibleVisitCountToHost( | 355 history_service->GetVisibleVisitCountToHost( |
356 request_url, | 356 request_url, |
357 base::Bind(&SSLBlockingPage::OnGotHistoryCount, | 357 base::Bind(&SSLBlockingPage::OnGotHistoryCount, |
358 base::Unretained(this)), | 358 base::Unretained(this)), |
359 &request_tracker_); | 359 &request_tracker_); |
360 } | 360 } |
361 } | 361 } |
362 | 362 |
363 ssl_error_classification_.reset(new SSLErrorClassification( | 363 ssl_error_classification_.reset(new SSLErrorClassification( |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 bool SSLBlockingPage::IsOptionsOverridable(int options_mask) { | 724 bool SSLBlockingPage::IsOptionsOverridable(int options_mask) { |
725 return (options_mask & SSLBlockingPage::OVERRIDABLE) && | 725 return (options_mask & SSLBlockingPage::OVERRIDABLE) && |
726 !(options_mask & SSLBlockingPage::STRICT_ENFORCEMENT); | 726 !(options_mask & SSLBlockingPage::STRICT_ENFORCEMENT); |
727 } | 727 } |
728 | 728 |
729 void SSLBlockingPage::OnGotHistoryCount(bool success, | 729 void SSLBlockingPage::OnGotHistoryCount(bool success, |
730 int num_visits, | 730 int num_visits, |
731 base::Time first_visit) { | 731 base::Time first_visit) { |
732 num_visits_ = num_visits; | 732 num_visits_ = num_visits; |
733 } | 733 } |
OLD | NEW |