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

Unified Diff: chrome/browser/ui/toolbar/toolbar_model_impl.cc

Issue 1440303002: Componentize SecurityStateModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android/cros fixes Created 5 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
« no previous file with comments | « chrome/browser/ui/tab_helpers.cc ('k') | chrome/browser/ui/views/frame/web_app_left_header_view_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/toolbar/toolbar_model_impl.cc
diff --git a/chrome/browser/ui/toolbar/toolbar_model_impl.cc b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
index 0cefbc6b0e367c96cecee20b110e111835a707ad..c06bf1fd44098e9f66830f516101341fbd967ac0 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/search.h"
-#include "chrome/browser/ssl/security_state_model.h"
+#include "chrome/browser/ssl/chrome_security_state_model_delegate.h"
#include "chrome/browser/ui/toolbar/toolbar_model_delegate.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
@@ -129,13 +129,14 @@ SecurityStateModel::SecurityLevel ToolbarModelImpl::GetSecurityLevel(
// initialization), assume no security style.
if (!web_contents)
return SecurityStateModel::NONE;
- const SecurityStateModel* model =
- SecurityStateModel::FromWebContents(web_contents);
+ const ChromeSecurityStateModelDelegate* model_delegate =
+ ChromeSecurityStateModelDelegate::FromWebContents(web_contents);
// When editing, assume no security style.
return (input_in_progress() && !ignore_editing)
? SecurityStateModel::NONE
- : model->GetSecurityInfo().security_level;
+ : static_cast<SecurityStateModel::SecurityLevel>(
+ model_delegate->GetSecurityInfo().security_level);
}
int ToolbarModelImpl::GetIcon() const {
« no previous file with comments | « chrome/browser/ui/tab_helpers.cc ('k') | chrome/browser/ui/views/frame/web_app_left_header_view_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698