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

Unified Diff: chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc

Issue 1189203003: Add UMA for consistency between TPM and install attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master3
Patch Set: Fix more tests. 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/enterprise_install_attributes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
diff --git a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
index 6058ba9260c3a08ca2a682694e19e4f172df1249..6b5b3cc4c584157c03be661fa5642bd2d29c9b44 100644
--- a/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
+++ b/chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc
@@ -111,14 +111,17 @@ BrowserPolicyConnectorChromeOS::BrowserPolicyConnectorChromeOS()
chromeos::CryptohomeClient* cryptohome_client =
chromeos::DBusThreadManager::Get()->GetCryptohomeClient();
+
+ // Don't initialize install attributes if g_testing_install_attributes have
+ // been injected.
if (!install_attributes_) {
install_attributes_.reset(
new EnterpriseInstallAttributes(cryptohome_client));
+ base::FilePath install_attrs_file;
+ CHECK(PathService::Get(chromeos::FILE_INSTALL_ATTRIBUTES,
+ &install_attrs_file));
+ install_attributes_->Init(install_attrs_file);
}
- base::FilePath install_attrs_file;
- CHECK(PathService::Get(chromeos::FILE_INSTALL_ATTRIBUTES,
- &install_attrs_file));
- install_attributes_->ReadCacheFile(install_attrs_file);
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/enterprise_install_attributes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698