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

Unified Diff: chrome/browser/chromeos/login/ownership_status_checker.cc

Issue 7830020: Revert 99169 - 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: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/ownership_status_checker.cc
===================================================================
--- chrome/browser/chromeos/login/ownership_status_checker.cc (revision 99240)
+++ chrome/browser/chromeos/login/ownership_status_checker.cc (working copy)
@@ -28,16 +28,13 @@
DCHECK(origin_loop_->BelongsToCurrentThread());
OwnershipService::Status status =
OwnershipService::GetSharedInstance()->GetStatus(false);
- // We can only report the OWNERSHIP_NONE status without executing code on the
- // file thread because checking whether the current user is owner needs file
- // access.
- if (status == OwnershipService::OWNERSHIP_NONE) {
+ if (status != OwnershipService::OWNERSHIP_UNKNOWN) {
// Take a spin on the message loop in order to avoid reentrancy in callers.
origin_loop_->PostTask(
FROM_HERE,
NewRunnableMethod(this,
&OwnershipStatusChecker::Core::ReportResult,
- status, false));
+ status));
} else {
// Switch to the file thread to make the blocking call.
BrowserThread::PostTask(
@@ -56,20 +53,18 @@
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
OwnershipService::Status status =
OwnershipService::GetSharedInstance()->GetStatus(true);
- bool current_user_is_owner =
- OwnershipService::GetSharedInstance()->CurrentUserIsOwner();
origin_loop_->PostTask(
FROM_HERE,
NewRunnableMethod(this,
&OwnershipStatusChecker::Core::ReportResult,
- status, current_user_is_owner));
+ status));
}
void OwnershipStatusChecker::Core::ReportResult(
- OwnershipService::Status status, bool current_user_is_owner) {
+ OwnershipService::Status status) {
DCHECK(origin_loop_->BelongsToCurrentThread());
if (callback_.get()) {
- callback_->Run(status, current_user_is_owner);
+ callback_->Run(status);
callback_.reset();
}
}
« no previous file with comments | « chrome/browser/chromeos/login/ownership_status_checker.h ('k') | chrome/browser/chromeos/login/signed_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698