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

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

Issue 24153012: Fix cyclic dependency between ProfilePolicyConnector and PrefService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix some includes and nits. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
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 fab4b9872b7bc3ca884abe982083dbf5c95072b2..b0721339a8d215e65a832ecddb2fcdc3fc8e3dab 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_impl.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model_impl.cc
@@ -12,8 +12,6 @@
#include "chrome/browser/autocomplete/autocomplete_input.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/google/google_util.h"
-#include "chrome/browser/policy/profile_policy_connector.h"
-#include "chrome/browser/policy/profile_policy_connector_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/search.h"
#include "chrome/browser/ssl/ssl_error_info.h"
@@ -36,6 +34,11 @@
#include "net/cert/x509_certificate.h"
#include "ui/base/l10n/l10n_util.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/policy/network_policy_service.h"
+#include "chrome/browser/chromeos/policy/network_policy_service_factory.h"
+#endif
+
using content::NavigationController;
using content::NavigationEntry;
using content::SSLStatus;
@@ -67,10 +70,12 @@ ToolbarModel::SecurityLevel ToolbarModelImpl::GetSecurityLevelForWebContents(
return SECURITY_ERROR;
case content::SECURITY_STYLE_AUTHENTICATED:
- if (policy::ProfilePolicyConnectorFactory::GetForProfile(
- Profile::FromBrowserContext(web_contents->GetBrowserContext()))->
- UsedPolicyCertificates())
+#if defined(OS_CHROMEOS)
+ if (policy::NetworkPolicyServiceFactory::GetForProfile(
+ Profile::FromBrowserContext(web_contents->GetBrowserContext()))
+ ->UsedPolicyCertificates())
return SECURITY_POLICY_WARNING;
+#endif
if (!!(ssl.content_status & SSLStatus::DISPLAYED_INSECURE_CONTENT))
return SECURITY_WARNING;
if (net::IsCertStatusError(ssl.cert_status)) {

Powered by Google App Engine
This is Rietveld 408576698