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

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

Issue 2683543005: Revert of Use TaskScheduler instead of blocking pool in wizard_controller.cc. (patchset #3 id:40001… (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
11 #include <string> 11 #include <string>
12 #include <utility> 12 #include <utility>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/callback_helpers.h" 16 #include "base/callback_helpers.h"
17 #include "base/command_line.h" 17 #include "base/command_line.h"
18 #include "base/location.h" 18 #include "base/location.h"
19 #include "base/logging.h" 19 #include "base/logging.h"
20 #include "base/macros.h" 20 #include "base/macros.h"
21 #include "base/metrics/histogram_macros.h" 21 #include "base/metrics/histogram_macros.h"
22 #include "base/single_thread_task_runner.h" 22 #include "base/single_thread_task_runner.h"
23 #include "base/strings/utf_string_conversions.h" 23 #include "base/strings/utf_string_conversions.h"
24 #include "base/task_scheduler/post_task.h"
25 #include "base/threading/thread_task_runner_handle.h" 24 #include "base/threading/thread_task_runner_handle.h"
26 #include "chrome/browser/browser_process.h" 25 #include "chrome/browser/browser_process.h"
27 #include "chrome/browser/browser_process_platform_part.h" 26 #include "chrome/browser/browser_process_platform_part.h"
28 #include "chrome/browser/chrome_notification_types.h" 27 #include "chrome/browser/chrome_notification_types.h"
29 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 28 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
30 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 29 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
31 #include "chrome/browser/chromeos/arc/arc_util.h" 30 #include "chrome/browser/chromeos/arc/arc_util.h"
32 #include "chrome/browser/chromeos/customization/customization_document.h" 31 #include "chrome/browser/chromeos/customization/customization_document.h"
33 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen. h" 32 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen. h"
34 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" 33 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 (network->type() == shill::kTypeCellular && 215 (network->type() == shill::kTypeCellular &&
217 !help_utils_chromeos::IsUpdateOverCellularAllowed())) { 216 !help_utils_chromeos::IsUpdateOverCellularAllowed())) {
218 return false; 217 return false;
219 } 218 }
220 return true; 219 return true;
221 } 220 }
222 221
223 #if defined(GOOGLE_CHROME_BUILD) 222 #if defined(GOOGLE_CHROME_BUILD)
224 void InitializeCrashReporter() { 223 void InitializeCrashReporter() {
225 // The crash reporter initialization needs IO to complete. 224 // The crash reporter initialization needs IO to complete.
225 DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
226 breakpad::InitCrashReporter(std::string()); 226 breakpad::InitCrashReporter(std::string());
227 } 227 }
228 #endif 228 #endif
229 229
230 } // namespace 230 } // namespace
231 231
232 namespace chromeos { 232 namespace chromeos {
233 233
234 // static 234 // static
235 const int WizardController::kMinAudibleOutputVolumePercent = 10; 235 const int WizardController::kMinAudibleOutputVolumePercent = 10;
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 } else { 717 } else {
718 InitiateOOBEUpdate(); 718 InitiateOOBEUpdate();
719 } 719 }
720 } 720 }
721 721
722 void WizardController::OnChangedMetricsReportingState(bool enabled) { 722 void WizardController::OnChangedMetricsReportingState(bool enabled) {
723 CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled); 723 CrosSettings::Get()->SetBoolean(kStatsReportingPref, enabled);
724 if (!enabled) 724 if (!enabled)
725 return; 725 return;
726 #if defined(GOOGLE_CHROME_BUILD) 726 #if defined(GOOGLE_CHROME_BUILD)
727 if (!base::PostTaskWithTraits(FROM_HERE, 727 if (!content::BrowserThread::PostBlockingPoolTask(
728 base::TaskTraits().MayBlock().WithPriority( 728 FROM_HERE, base::Bind(&InitializeCrashReporter))) {
729 base::TaskPriority::BACKGROUND),
730 base::Bind(&InitializeCrashReporter))) {
731 LOG(ERROR) << "Failed to start crash reporter initialization."; 729 LOG(ERROR) << "Failed to start crash reporter initialization.";
732 } 730 }
733 #endif 731 #endif
734 } 732 }
735 733
736 void WizardController::OnUpdateErrorCheckingForUpdate() { 734 void WizardController::OnUpdateErrorCheckingForUpdate() {
737 // TODO(nkostylev): Update should be required during OOBE. 735 // TODO(nkostylev): Update should be required during OOBE.
738 // We do not want to block users from being able to proceed to the login 736 // We do not want to block users from being able to proceed to the login
739 // screen if there is any error checking for an update. 737 // screen if there is any error checking for an update.
740 // They could use "browse without sign-in" feature to set up the network to be 738 // They could use "browse without sign-in" feature to set up the network to be
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT; 1506 : policy::EnrollmentConfig::MODE_MANUAL_REENROLLMENT;
1509 } 1507 }
1510 1508
1511 EnrollmentScreen* screen = EnrollmentScreen::Get(this); 1509 EnrollmentScreen* screen = EnrollmentScreen::Get(this);
1512 screen->SetParameters(effective_config, shark_controller_.get()); 1510 screen->SetParameters(effective_config, shark_controller_.get());
1513 SetStatusAreaVisible(true); 1511 SetStatusAreaVisible(true);
1514 SetCurrentScreen(screen); 1512 SetCurrentScreen(screen);
1515 } 1513 }
1516 1514
1517 } // namespace chromeos 1515 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698