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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc

Issue 2448943002: Refactor SecurityStateModel/Clients for simplicity and reusability. (Closed)
Patch Set: refactor -> SecurityStateTabHelper. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
index 9605b246f4be332f677e9d2fa8c24a558b84395f..9296e90ccb6ee97c321d1faa28bb6a2ac4d8b1cf 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
@@ -26,7 +26,7 @@
#include "chrome/browser/safe_browsing/threat_details.h"
#include "chrome/browser/safe_browsing/ui_manager.h"
#include "chrome/browser/ssl/cert_verifier_browser_test.h"
-#include "chrome/browser/ssl/chrome_security_state_model_client.h"
+#include "chrome/browser/ssl/security_state_tab_helper.h"
#include "chrome/browser/ssl/ssl_blocking_page.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_tabstrip.h"
@@ -581,24 +581,24 @@ class SafeBrowsingBlockingPageBrowserTest
void ExpectSecurityIndicatorDowngrade(content::WebContents* tab,
net::CertStatus cert_status) {
- ChromeSecurityStateModelClient* model_client =
- ChromeSecurityStateModelClient::FromWebContents(tab);
- ASSERT_TRUE(model_client);
+ SecurityStateTabHelper* helper =
+ SecurityStateTabHelper::FromWebContents(tab);
+ ASSERT_TRUE(helper);
security_state::SecurityStateModel::SecurityInfo security_info;
- model_client->GetSecurityInfo(&security_info);
+ helper->GetSecurityInfo(&security_info);
EXPECT_EQ(security_state::SecurityStateModel::DANGEROUS,
security_info.security_level);
EXPECT_TRUE(security_info.fails_malware_check);
// TODO(felt): Restore this check when https://crbug.com/641187 is fixed.
- // EXPECT_EQ(cert_status, model_client->GetSecurityInfo().cert_status);
+ // EXPECT_EQ(cert_status, helper->GetSecurityInfo().cert_status);
}
void ExpectNoSecurityIndicatorDowngrade(content::WebContents* tab) {
- ChromeSecurityStateModelClient* model_client =
- ChromeSecurityStateModelClient::FromWebContents(tab);
- ASSERT_TRUE(model_client);
+ SecurityStateTabHelper* helper =
+ SecurityStateTabHelper::FromWebContents(tab);
+ ASSERT_TRUE(helper);
security_state::SecurityStateModel::SecurityInfo security_info;
- model_client->GetSecurityInfo(&security_info);
+ helper->GetSecurityInfo(&security_info);
EXPECT_EQ(security_state::SecurityStateModel::NONE,
security_info.security_level);
EXPECT_FALSE(security_info.fails_malware_check);

Powered by Google App Engine
This is Rietveld 408576698