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

Side by Side Diff: chrome/browser/ssl/ssl_error_handler.cc

Issue 2911123002: Replace deprecated base::NonThreadSafe in chrome/browser/ssl in favor of SequenceChecker. (Closed)
Patch Set: Created 3 years, 6 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 | « chrome/browser/ssl/common_name_mismatch_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_error_handler.h" 5 #include "chrome/browser/ssl/ssl_error_handler.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <unordered_set> 8 #include <unordered_set>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/callback_helpers.h" 11 #include "base/callback_helpers.h"
12 #include "base/feature_list.h" 12 #include "base/feature_list.h"
13 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
14 #include "base/lazy_instance.h" 14 #include "base/lazy_instance.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ptr_util.h" 16 #include "base/memory/ptr_util.h"
17 #include "base/metrics/histogram_macros.h" 17 #include "base/metrics/histogram_macros.h"
18 #include "base/strings/stringprintf.h" 18 #include "base/strings/stringprintf.h"
19 #include "base/threading/non_thread_safe.h"
20 #include "base/time/clock.h" 19 #include "base/time/clock.h"
21 #include "base/time/time.h" 20 #include "base/time/time.h"
22 #include "chrome/browser/browser_process.h" 21 #include "chrome/browser/browser_process.h"
23 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
24 #include "chrome/browser/ssl/bad_clock_blocking_page.h" 23 #include "chrome/browser/ssl/bad_clock_blocking_page.h"
25 #include "chrome/browser/ssl/ssl_blocking_page.h" 24 #include "chrome/browser/ssl/ssl_blocking_page.h"
26 #include "chrome/browser/ssl/ssl_cert_reporter.h" 25 #include "chrome/browser/ssl/ssl_cert_reporter.h"
27 #include "chrome/browser/ssl/ssl_error_assistant.pb.h" 26 #include "chrome/browser/ssl/ssl_error_assistant.pb.h"
28 #include "chrome/common/features.h" 27 #include "chrome/common/features.h"
29 #include "chrome/grit/browser_resources.h" 28 #include "chrome/grit/browser_resources.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 160 }
162 return hashes; 161 return hashes;
163 } 162 }
164 #endif 163 #endif
165 164
166 bool IsSSLCommonNameMismatchHandlingEnabled() { 165 bool IsSSLCommonNameMismatchHandlingEnabled() {
167 return base::FeatureList::IsEnabled(kSSLCommonNameMismatchHandling); 166 return base::FeatureList::IsEnabled(kSSLCommonNameMismatchHandling);
168 } 167 }
169 168
170 // Configuration for SSLErrorHandler. 169 // Configuration for SSLErrorHandler.
171 class ConfigSingleton : public base::NonThreadSafe { 170 class ConfigSingleton {
172 public: 171 public:
173 ConfigSingleton(); 172 ConfigSingleton();
174 173
175 base::TimeDelta interstitial_delay() const; 174 base::TimeDelta interstitial_delay() const;
176 SSLErrorHandler::TimerStartedCallback* timer_started_callback() const; 175 SSLErrorHandler::TimerStartedCallback* timer_started_callback() const;
177 base::Clock* clock() const; 176 base::Clock* clock() const;
178 network_time::NetworkTimeTracker* network_time_tracker() const; 177 network_time::NetworkTimeTracker* network_time_tracker() const;
179 178
180 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) 179 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
181 // Returns true if any of the SHA256 hashes in |ssl_info| is of a captive 180 // Returns true if any of the SHA256 hashes in |ssl_info| is of a captive
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 network_time::NetworkTimeTracker* tracker = 771 network_time::NetworkTimeTracker* tracker =
773 g_config.Pointer()->network_time_tracker(); 772 g_config.Pointer()->network_time_tracker();
774 ssl_errors::ClockState clock_state = ssl_errors::GetClockState(now, tracker); 773 ssl_errors::ClockState clock_state = ssl_errors::GetClockState(now, tracker);
775 if (clock_state == ssl_errors::CLOCK_STATE_FUTURE || 774 if (clock_state == ssl_errors::CLOCK_STATE_FUTURE ||
776 clock_state == ssl_errors::CLOCK_STATE_PAST) { 775 clock_state == ssl_errors::CLOCK_STATE_PAST) {
777 ShowBadClockInterstitial(now, clock_state); 776 ShowBadClockInterstitial(now, clock_state);
778 return; // |this| is deleted after showing the interstitial. 777 return; // |this| is deleted after showing the interstitial.
779 } 778 }
780 ShowSSLInterstitial(); 779 ShowSSLInterstitial();
781 } 780 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/common_name_mismatch_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698