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

Unified Diff: chrome/browser/policy/profile_policy_connector.cc

Issue 1150373002: platformKeys: Add policy and corporate key tagging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@key_perm
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/profile_policy_connector.cc
diff --git a/chrome/browser/policy/profile_policy_connector.cc b/chrome/browser/policy/profile_policy_connector.cc
index 12b5b44e65566fd688605f7ba6298f9cdcd9f62b..894c305da7e464818353eaceb9b51125bfaf16d7 100644
--- a/chrome/browser/policy/profile_policy_connector.cc
+++ b/chrome/browser/policy/profile_policy_connector.cc
@@ -131,8 +131,11 @@ void ProfilePolicyConnector::Init(
#endif
}
-void ProfilePolicyConnector::InitForTesting(scoped_ptr<PolicyService> service) {
+void ProfilePolicyConnector::InitForTesting(
+ scoped_ptr<PolicyService> service,
+ CloudPolicyManager* user_cloud_policy_manager) {
policy_service_ = service.Pass();
+ user_cloud_policy_manager_ = user_cloud_policy_manager;
}
void ProfilePolicyConnector::Shutdown() {
@@ -153,9 +156,12 @@ bool ProfilePolicyConnector::IsManaged() const {
}
std::string ProfilePolicyConnector::GetManagementDomain() const {
+ LOG(ERROR) << "cloud policy mgr " << user_cloud_policy_manager_;
if (!user_cloud_policy_manager_)
return "";
CloudPolicyStore* store = user_cloud_policy_manager_->core()->store();
+ LOG(ERROR) << "store " << (store != nullptr) << " is_managed "
+ << (store ? store->is_managed() : false);
if (store && store->is_managed() && store->policy()->has_username())
return gaia::ExtractDomainName(store->policy()->username());
return "";

Powered by Google App Engine
This is Rietveld 408576698