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

Side by Side Diff: chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.cc

Issue 2534433002: Mop up incorrect uses of IsEnterpriseManaged() (Closed)
Patch Set: Address Roman's comment Created 4 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/device_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 core()->Connect(std::move(client_to_connect)); 258 core()->Connect(std::move(client_to_connect));
259 core()->StartRefreshScheduler(); 259 core()->StartRefreshScheduler();
260 core()->RefreshSoon(); 260 core()->RefreshSoon();
261 core()->StartRemoteCommandsService(std::unique_ptr<RemoteCommandsFactory>( 261 core()->StartRemoteCommandsService(std::unique_ptr<RemoteCommandsFactory>(
262 new DeviceCommandsFactoryChromeOS())); 262 new DeviceCommandsFactoryChromeOS()));
263 core()->TrackRefreshDelayPref(local_state_, 263 core()->TrackRefreshDelayPref(local_state_,
264 prefs::kDevicePolicyRefreshRate); 264 prefs::kDevicePolicyRefreshRate);
265 attestation_policy_observer_.reset( 265 attestation_policy_observer_.reset(
266 new chromeos::attestation::AttestationPolicyObserver(client())); 266 new chromeos::attestation::AttestationPolicyObserver(client()));
267 267
268 // Enable device reporting and status monitoring for enterprise enrolled 268 // Enable device reporting and status monitoring for cloud managed devices. We
269 // devices. We want to create these objects for enrolled devices, even if 269 // want to create these objects even if monitoring is currently inactive, in
270 // monitoring is currently inactive, in case monitoring is turned back on in 270 // case monitoring is turned back on in a future policy fetch - the classes
271 // a future policy fetch - the classes themselves track the current state of 271 // themselves track the current state of the monitoring settings and only
272 // the monitoring settings and only perform monitoring if it is active. 272 // perform monitoring if it is active.
273 if (install_attributes->IsEnterpriseManaged()) { 273 if (install_attributes->IsCloudManaged()) {
274 CreateStatusUploader(); 274 CreateStatusUploader();
275 syslog_uploader_.reset(new SystemLogUploader(nullptr, task_runner_)); 275 syslog_uploader_.reset(new SystemLogUploader(nullptr, task_runner_));
276 heartbeat_scheduler_.reset(new HeartbeatScheduler( 276 heartbeat_scheduler_.reset(new HeartbeatScheduler(
277 g_browser_process->gcm_driver(), client(), 277 g_browser_process->gcm_driver(), client(),
278 install_attributes->GetDomain(), install_attributes->GetDeviceId(), 278 install_attributes->GetDomain(), install_attributes->GetDeviceId(),
279 task_runner_)); 279 task_runner_));
280 } 280 }
281 281
282 NotifyConnected(); 282 NotifyConnected();
283 } 283 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 base::MakeUnique<DeviceStatusCollector>( 363 base::MakeUnique<DeviceStatusCollector>(
364 local_state_, chromeos::system::StatisticsProvider::GetInstance(), 364 local_state_, chromeos::system::StatisticsProvider::GetInstance(),
365 DeviceStatusCollector::VolumeInfoFetcher(), 365 DeviceStatusCollector::VolumeInfoFetcher(),
366 DeviceStatusCollector::CPUStatisticsFetcher(), 366 DeviceStatusCollector::CPUStatisticsFetcher(),
367 DeviceStatusCollector::CPUTempFetcher(), 367 DeviceStatusCollector::CPUTempFetcher(),
368 DeviceStatusCollector::AndroidStatusFetcher()), 368 DeviceStatusCollector::AndroidStatusFetcher()),
369 task_runner_)); 369 task_runner_));
370 } 370 }
371 371
372 } // namespace policy 372 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698