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

Side by Side Diff: chrome/browser/chromeos/policy/consumer_management_service.h

Issue 733613005: Move the notification part out of ConsumerEnrollmentHandler so that it can be reused for unenrollme… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@enroll
Patch Set: Added a check for UserManager. Created 6 years, 1 month 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 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_CONSUMER_MANAGEMENT_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_CONSUMER_MANAGEMENT_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_CONSUMER_MANAGEMENT_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_CONSUMER_MANAGEMENT_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 // Stores the device owner user ID into the boot lockbox and signs it. 139 // Stores the device owner user ID into the boot lockbox and signs it.
140 // |callback| is invoked with an agument indicating success or failure. 140 // |callback| is invoked with an agument indicating success or failure.
141 void SetOwner(const std::string& user_id, const SetOwnerCallback& callback); 141 void SetOwner(const std::string& user_id, const SetOwnerCallback& callback);
142 142
143 // chromeos::DeviceSettingsService::Observer: 143 // chromeos::DeviceSettingsService::Observer:
144 virtual void OwnershipStatusChanged() override; 144 virtual void OwnershipStatusChanged() override;
145 virtual void DeviceSettingsUpdated() override; 145 virtual void DeviceSettingsUpdated() override;
146 virtual void OnDeviceSettingsServiceShutdown() override; 146 virtual void OnDeviceSettingsServiceShutdown() override;
147 147
148 protected:
149 void NotifyStatusChanged();
150
148 private: 151 private:
149 void OnGetBootAttributeDone( 152 void OnGetBootAttributeDone(
150 const GetOwnerCallback& callback, 153 const GetOwnerCallback& callback,
151 chromeos::DBusMethodCallStatus call_status, 154 chromeos::DBusMethodCallStatus call_status,
152 bool dbus_success, 155 bool dbus_success,
153 const cryptohome::BaseReply& reply); 156 const cryptohome::BaseReply& reply);
154 157
155 void OnSetBootAttributeDone(const SetOwnerCallback& callback, 158 void OnSetBootAttributeDone(const SetOwnerCallback& callback,
156 chromeos::DBusMethodCallStatus call_status, 159 chromeos::DBusMethodCallStatus call_status,
157 bool dbus_success, 160 bool dbus_success,
158 const cryptohome::BaseReply& reply); 161 const cryptohome::BaseReply& reply);
159 162
160 void OnFlushAndSignBootAttributesDone( 163 void OnFlushAndSignBootAttributesDone(
161 const SetOwnerCallback& callback, 164 const SetOwnerCallback& callback,
162 chromeos::DBusMethodCallStatus call_status, 165 chromeos::DBusMethodCallStatus call_status,
163 bool dbus_success, 166 bool dbus_success,
164 const cryptohome::BaseReply& reply); 167 const cryptohome::BaseReply& reply);
165 168
166 void NotifyStatusChanged();
167
168 chromeos::CryptohomeClient* client_; 169 chromeos::CryptohomeClient* client_;
169 chromeos::DeviceSettingsService* device_settings_service_; 170 chromeos::DeviceSettingsService* device_settings_service_;
170 171
171 ObserverList<Observer, true> observers_; 172 ObserverList<Observer, true> observers_;
172 base::WeakPtrFactory<ConsumerManagementService> weak_ptr_factory_; 173 base::WeakPtrFactory<ConsumerManagementService> weak_ptr_factory_;
173 174
174 DISALLOW_COPY_AND_ASSIGN(ConsumerManagementService); 175 DISALLOW_COPY_AND_ASSIGN(ConsumerManagementService);
175 }; 176 };
176 177
177 } // namespace policy 178 } // namespace policy
178 179
179 #endif // CHROME_BROWSER_CHROMEOS_POLICY_CONSUMER_MANAGEMENT_SERVICE_H_ 180 #endif // CHROME_BROWSER_CHROMEOS_POLICY_CONSUMER_MANAGEMENT_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698