| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 6 | 6 |
| 7 #include <signal.h> | 7 #include <signal.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 | 10 |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 FROM_HERE, | 681 FROM_HERE, |
| 682 base::Bind(&CreateOobeCompleteFlagFile)); | 682 base::Bind(&CreateOobeCompleteFlagFile)); |
| 683 return true; | 683 return true; |
| 684 } else if (value == 0) { | 684 } else if (value == 0) { |
| 685 return false; | 685 return false; |
| 686 } else { | 686 } else { |
| 687 // Pref is not set. For compatibility check flag file. It causes blocking | 687 // Pref is not set. For compatibility check flag file. It causes blocking |
| 688 // IO on UI thread. But it's required for update from old versions. | 688 // IO on UI thread. But it's required for update from old versions. |
| 689 base::ThreadRestrictions::ScopedAllowIO allow_io; | 689 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 690 FilePath oobe_complete_flag_file_path = GetOobeCompleteFlagPath(); | 690 FilePath oobe_complete_flag_file_path = GetOobeCompleteFlagPath(); |
| 691 DVLOG(1) << "Checking " << oobe_complete_flag_file_path.value(); | |
| 692 bool file_exists = file_util::PathExists(oobe_complete_flag_file_path); | 691 bool file_exists = file_util::PathExists(oobe_complete_flag_file_path); |
| 693 SaveIntegerPreferenceForced(kDeviceRegistered, file_exists ? 1 : 0); | 692 SaveIntegerPreferenceForced(kDeviceRegistered, file_exists ? 1 : 0); |
| 694 return file_exists; | 693 return file_exists; |
| 695 } | 694 } |
| 696 } | 695 } |
| 697 | 696 |
| 698 // static | 697 // static |
| 699 void WizardController::MarkDeviceRegistered() { | 698 void WizardController::MarkDeviceRegistered() { |
| 700 SaveIntegerPreferenceForced(kDeviceRegistered, 1); | 699 SaveIntegerPreferenceForced(kDeviceRegistered, 1); |
| 701 BrowserThread::PostTask( | 700 BrowserThread::PostTask( |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 | 787 |
| 789 bool WizardController::GetUsageStatisticsReporting() const { | 788 bool WizardController::GetUsageStatisticsReporting() const { |
| 790 return usage_statistics_reporting_; | 789 return usage_statistics_reporting_; |
| 791 } | 790 } |
| 792 | 791 |
| 793 void WizardController::SetZeroDelays() { | 792 void WizardController::SetZeroDelays() { |
| 794 kShowDelayMs = 0; | 793 kShowDelayMs = 0; |
| 795 } | 794 } |
| 796 | 795 |
| 797 } // namespace chromeos | 796 } // namespace chromeos |
| OLD | NEW |