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

Side by Side Diff: ios/chrome/browser/ssl/ios_security_state_tab_helper.mm

Issue 2502363006: [ObjC ARC] Converts ios/chrome/browser/ssl:ssl to ARC.Automatically generated ARCMigrate commitN… (Closed)
Patch Set: Created 4 years, 1 month 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 | « ios/chrome/browser/ssl/BUILD.gn ('k') | ios/chrome/browser/ssl/ios_ssl_blocking_page.mm » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ios/chrome/browser/ssl/ios_security_state_tab_helper.h" 5 #include "ios/chrome/browser/ssl/ios_security_state_tab_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 #include "base/metrics/histogram_macros.h" 11 #include "base/metrics/histogram_macros.h"
12 #include "components/security_state/core/security_state.h" 12 #include "components/security_state/core/security_state.h"
13 #include "ios/web/public/navigation_item.h" 13 #include "ios/web/public/navigation_item.h"
14 #import "ios/web/public/navigation_manager.h" 14 #import "ios/web/public/navigation_manager.h"
15 #import "ios/web/public/origin_util.h" 15 #import "ios/web/public/origin_util.h"
16 #include "ios/web/public/security_style.h" 16 #include "ios/web/public/security_style.h"
17 #include "ios/web/public/ssl_status.h" 17 #include "ios/web/public/ssl_status.h"
18 #include "ios/web/public/web_state/web_state.h" 18 #include "ios/web/public/web_state/web_state.h"
19 #include "net/cert/x509_certificate.h" 19 #include "net/cert/x509_certificate.h"
20 20
21 #if !defined(__has_feature) || !__has_feature(objc_arc)
22 #error "This file requires ARC support."
23 #endif
24
21 DEFINE_WEB_STATE_USER_DATA_KEY(IOSSecurityStateTabHelper); 25 DEFINE_WEB_STATE_USER_DATA_KEY(IOSSecurityStateTabHelper);
22 26
23 IOSSecurityStateTabHelper::IOSSecurityStateTabHelper(web::WebState* web_state) 27 IOSSecurityStateTabHelper::IOSSecurityStateTabHelper(web::WebState* web_state)
24 : web_state_(web_state) {} 28 : web_state_(web_state) {}
25 29
26 IOSSecurityStateTabHelper::~IOSSecurityStateTabHelper() {} 30 IOSSecurityStateTabHelper::~IOSSecurityStateTabHelper() {}
27 31
28 void IOSSecurityStateTabHelper::GetSecurityInfo( 32 void IOSSecurityStateTabHelper::GetSecurityInfo(
29 security_state::SecurityInfo* result) const { 33 security_state::SecurityInfo* result) const {
30 security_state::GetSecurityInfo(GetVisibleSecurityState(), 34 security_state::GetSecurityInfo(GetVisibleSecurityState(),
(...skipping 15 matching lines...) Expand all
46 const web::SSLStatus& ssl = item->GetSSL(); 50 const web::SSLStatus& ssl = item->GetSSL();
47 state->certificate = ssl.certificate; 51 state->certificate = ssl.certificate;
48 state->cert_status = ssl.cert_status; 52 state->cert_status = ssl.cert_status;
49 state->connection_status = ssl.connection_status; 53 state->connection_status = ssl.connection_status;
50 state->security_bits = ssl.security_bits; 54 state->security_bits = ssl.security_bits;
51 state->displayed_mixed_content = 55 state->displayed_mixed_content =
52 (ssl.content_status & web::SSLStatus::DISPLAYED_INSECURE_CONTENT) ? true 56 (ssl.content_status & web::SSLStatus::DISPLAYED_INSECURE_CONTENT) ? true
53 : false; 57 : false;
54 return state; 58 return state;
55 } 59 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/ssl/BUILD.gn ('k') | ios/chrome/browser/ssl/ios_ssl_blocking_page.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698