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

Side by Side 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: Simplified after comments by Mattias. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 5 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 chromeos::CryptohomeClient* cryptohome_client = 112 chromeos::CryptohomeClient* cryptohome_client =
113 chromeos::DBusThreadManager::Get()->GetCryptohomeClient(); 113 chromeos::DBusThreadManager::Get()->GetCryptohomeClient();
114 if (!install_attributes_) { 114 if (!install_attributes_) {
115 install_attributes_.reset( 115 install_attributes_.reset(
116 new EnterpriseInstallAttributes(cryptohome_client)); 116 new EnterpriseInstallAttributes(cryptohome_client));
117 } 117 }
118 base::FilePath install_attrs_file; 118 base::FilePath install_attrs_file;
119 CHECK(PathService::Get(chromeos::FILE_INSTALL_ATTRIBUTES, 119 CHECK(PathService::Get(chromeos::FILE_INSTALL_ATTRIBUTES,
120 &install_attrs_file)); 120 &install_attrs_file));
121 install_attributes_->ReadCacheFile(install_attrs_file); 121 install_attributes_->Init(install_attrs_file);
122 122
123 const base::CommandLine* command_line = 123 const base::CommandLine* command_line =
124 base::CommandLine::ForCurrentProcess(); 124 base::CommandLine::ForCurrentProcess();
125 if (command_line->HasSwitch( 125 if (command_line->HasSwitch(
126 chromeos::switches::kEnableConsumerManagement)) { 126 chromeos::switches::kEnableConsumerManagement)) {
127 consumer_management_service_.reset( 127 consumer_management_service_.reset(
128 new ConsumerManagementService( 128 new ConsumerManagementService(
129 cryptohome_client, 129 cryptohome_client,
130 chromeos::DeviceSettingsService::Get())); 130 chromeos::DeviceSettingsService::Get()));
131 } 131 }
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 consumer_device_management_service_.get(), 371 consumer_device_management_service_.get(),
372 GetBackgroundTaskRunner(), 372 GetBackgroundTaskRunner(),
373 install_attributes_.get(), 373 install_attributes_.get(),
374 state_keys_broker_.get(), 374 state_keys_broker_.get(),
375 device_cloud_policy_manager_->device_store(), 375 device_cloud_policy_manager_->device_store(),
376 device_cloud_policy_manager_)); 376 device_cloud_policy_manager_));
377 device_cloud_policy_initializer_->Init(); 377 device_cloud_policy_initializer_->Init();
378 } 378 }
379 379
380 } // namespace policy 380 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698