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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 7741045: Delay the metrics policy migration call to make sure ownership has been taken. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed nits. Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/existing_user_controller.h" 5 #include "chrome/browser/chromeos/login/existing_user_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 void ExistingUserController::OnStartEnterpriseEnrollment() { 244 void ExistingUserController::OnStartEnterpriseEnrollment() {
245 CommandLine* command_line = CommandLine::ForCurrentProcess(); 245 CommandLine* command_line = CommandLine::ForCurrentProcess();
246 if (command_line->HasSwitch(switches::kEnableDevicePolicy)) { 246 if (command_line->HasSwitch(switches::kEnableDevicePolicy)) {
247 ownership_checker_.reset(new OwnershipStatusChecker(NewCallback( 247 ownership_checker_.reset(new OwnershipStatusChecker(NewCallback(
248 this, &ExistingUserController::OnEnrollmentOwnershipCheckCompleted))); 248 this, &ExistingUserController::OnEnrollmentOwnershipCheckCompleted)));
249 } 249 }
250 } 250 }
251 251
252 void ExistingUserController::OnEnrollmentOwnershipCheckCompleted( 252 void ExistingUserController::OnEnrollmentOwnershipCheckCompleted(
253 OwnershipService::Status status) { 253 OwnershipService::Status status,
254 bool current_user_is_owner) {
254 if (status == OwnershipService::OWNERSHIP_NONE) { 255 if (status == OwnershipService::OWNERSHIP_NONE) {
255 host_->StartWizard(WizardController::kEnterpriseEnrollmentScreenName, 256 host_->StartWizard(WizardController::kEnterpriseEnrollmentScreenName,
256 GURL()); 257 GURL());
257 login_display_->OnFadeOut(); 258 login_display_->OnFadeOut();
258 } 259 }
259 ownership_checker_.reset(); 260 ownership_checker_.reset();
260 } 261 }
261 262
262 //////////////////////////////////////////////////////////////////////////////// 263 ////////////////////////////////////////////////////////////////////////////////
263 // ExistingUserController, LoginPerformer::Delegate implementation: 264 // ExistingUserController, LoginPerformer::Delegate implementation:
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 } 561 }
561 if (CrosLibrary::Get()->EnsureLoaded()) { 562 if (CrosLibrary::Get()->EnsureLoaded()) {
562 CryptohomeLibrary* cryptohomed = CrosLibrary::Get()->GetCryptohomeLibrary(); 563 CryptohomeLibrary* cryptohomed = CrosLibrary::Get()->GetCryptohomeLibrary();
563 cryptohomed->AsyncSetOwnerUser( 564 cryptohomed->AsyncSetOwnerUser(
564 UserCrosSettingsProvider::cached_owner(), NULL); 565 UserCrosSettingsProvider::cached_owner(), NULL);
565 cryptohomed->AsyncDoAutomaticFreeDiskSpaceControl(NULL); 566 cryptohomed->AsyncDoAutomaticFreeDiskSpaceControl(NULL);
566 } 567 }
567 } 568 }
568 569
569 } // namespace chromeos 570 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/existing_user_controller.h ('k') | chrome/browser/chromeos/login/ownership_status_checker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698