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

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

Issue 1997453003: Fix "unused variable" warnings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move changes in and out to fix compile Created 4 years, 7 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/consumer_unenrollment_handler.h" 5 #include "chrome/browser/chromeos/policy/consumer_unenrollment_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" 9 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h"
10 #include "chrome/browser/chromeos/policy/consumer_management_service.h" 10 #include "chrome/browser/chromeos/policy/consumer_management_service.h"
11 #include "chrome/browser/chromeos/policy/consumer_management_stage.h" 11 #include "chrome/browser/chromeos/policy/consumer_management_stage.h"
12 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" 12 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
13 #include "chrome/browser/chromeos/settings/device_settings_service.h"
14 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 13 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
15 #include "policy/proto/device_management_backend.pb.h" 14 #include "policy/proto/device_management_backend.pb.h"
16 15
17 namespace em = enterprise_management; 16 namespace em = enterprise_management;
18 17
19 namespace policy { 18 namespace policy {
20 19
21 ConsumerUnenrollmentHandler::ConsumerUnenrollmentHandler( 20 ConsumerUnenrollmentHandler::ConsumerUnenrollmentHandler(
22 chromeos::DeviceSettingsService* device_settings_service,
23 ConsumerManagementService* consumer_management_service, 21 ConsumerManagementService* consumer_management_service,
24 DeviceCloudPolicyManagerChromeOS* device_cloud_policy_manager, 22 DeviceCloudPolicyManagerChromeOS* device_cloud_policy_manager,
25 chromeos::OwnerSettingsServiceChromeOS* owner_settings_service) 23 chromeos::OwnerSettingsServiceChromeOS* owner_settings_service)
26 : device_settings_service_(device_settings_service), 24 : consumer_management_service_(consumer_management_service),
27 consumer_management_service_(consumer_management_service),
28 device_cloud_policy_manager_(device_cloud_policy_manager), 25 device_cloud_policy_manager_(device_cloud_policy_manager),
29 owner_settings_service_(owner_settings_service), 26 owner_settings_service_(owner_settings_service),
30 weak_factory_(this) { 27 weak_factory_(this) {}
31 }
32 28
33 ConsumerUnenrollmentHandler::~ConsumerUnenrollmentHandler() { 29 ConsumerUnenrollmentHandler::~ConsumerUnenrollmentHandler() {
34 } 30 }
35 31
36 void ConsumerUnenrollmentHandler::Start() { 32 void ConsumerUnenrollmentHandler::Start() {
37 if (consumer_management_service_->GetStatus() != 33 if (consumer_management_service_->GetStatus() !=
38 ConsumerManagementService::STATUS_ENROLLED) { 34 ConsumerManagementService::STATUS_ENROLLED) {
39 return; 35 return;
40 } 36 }
41 37
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 consumer_management_service_->SetStage( 69 consumer_management_service_->SetStage(
74 ConsumerManagementStage::UnenrollmentSuccess()); 70 ConsumerManagementStage::UnenrollmentSuccess());
75 71
76 // Disconnecting the device cloud policy manager will restart the device 72 // Disconnecting the device cloud policy manager will restart the device
77 // cloud policy initializer. So this must be done after the management 73 // cloud policy initializer. So this must be done after the management
78 // settings are updated, so that the initializer won't reconnect the manager. 74 // settings are updated, so that the initializer won't reconnect the manager.
79 device_cloud_policy_manager_->Disconnect(); 75 device_cloud_policy_manager_->Disconnect();
80 } 76 }
81 77
82 } // namespace policy 78 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698