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

Side by Side Diff: chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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/login/enrollment/auto_enrollment_controller.h" 5 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 safeguard_timer_.Stop(); 170 safeguard_timer_.Stop();
171 } 171 }
172 172
173 void AutoEnrollmentController::Retry() { 173 void AutoEnrollmentController::Retry() {
174 if (client_) 174 if (client_)
175 client_->Retry(); 175 client_->Retry();
176 else 176 else
177 Start(); 177 Start();
178 } 178 }
179 179
180 scoped_ptr<AutoEnrollmentController::ProgressCallbackList::Subscription> 180 std::unique_ptr<AutoEnrollmentController::ProgressCallbackList::Subscription>
181 AutoEnrollmentController::RegisterProgressCallback( 181 AutoEnrollmentController::RegisterProgressCallback(
182 const ProgressCallbackList::CallbackType& callback) { 182 const ProgressCallbackList::CallbackType& callback) {
183 return progress_callbacks_.Add(callback); 183 return progress_callbacks_.Add(callback);
184 } 184 }
185 185
186 void AutoEnrollmentController::OnOwnershipStatusCheckDone( 186 void AutoEnrollmentController::OnOwnershipStatusCheckDone(
187 DeviceSettingsService::OwnershipStatus status) { 187 DeviceSettingsService::OwnershipStatus status) {
188 switch (status) { 188 switch (status) {
189 case DeviceSettingsService::OWNERSHIP_NONE: { 189 case DeviceSettingsService::OWNERSHIP_NONE: {
190 g_browser_process->platform_part() 190 g_browser_process->platform_part()
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 // open. 285 // open.
286 LOG(ERROR) << "AutoEnrollmentClient didn't complete within time limit."; 286 LOG(ERROR) << "AutoEnrollmentClient didn't complete within time limit.";
287 UpdateState(policy::AUTO_ENROLLMENT_STATE_CONNECTION_ERROR); 287 UpdateState(policy::AUTO_ENROLLMENT_STATE_CONNECTION_ERROR);
288 } 288 }
289 289
290 // Reset state. 290 // Reset state.
291 Cancel(); 291 Cancel();
292 } 292 }
293 293
294 } // namespace chromeos 294 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698