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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 2676003002: Use TaskScheduler instead of blocking pool in chrome_browser_main_chromeos.cc. (Closed)
Patch Set: upload 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chrome_browser_main_chromeos.h" 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "ash/shell.h" 13 #include "ash/shell.h"
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/callback.h" 15 #include "base/callback.h"
16 #include "base/command_line.h" 16 #include "base/command_line.h"
17 #include "base/files/file_util.h" 17 #include "base/files/file_util.h"
18 #include "base/lazy_instance.h" 18 #include "base/lazy_instance.h"
19 #include "base/linux_util.h" 19 #include "base/linux_util.h"
20 #include "base/macros.h" 20 #include "base/macros.h"
21 #include "base/memory/ptr_util.h" 21 #include "base/memory/ptr_util.h"
22 #include "base/path_service.h" 22 #include "base/path_service.h"
23 #include "base/strings/string_number_conversions.h" 23 #include "base/strings/string_number_conversions.h"
24 #include "base/strings/string_split.h" 24 #include "base/strings/string_split.h"
25 #include "base/sys_info.h" 25 #include "base/sys_info.h"
26 #include "base/task_runner_util.h" 26 #include "base/task_scheduler/post_task.h"
27 #include "chrome/browser/browser_process.h" 27 #include "chrome/browser/browser_process.h"
28 #include "chrome/browser/browser_process_platform_part_chromeos.h" 28 #include "chrome/browser/browser_process_platform_part_chromeos.h"
29 #include "chrome/browser/chrome_notification_types.h" 29 #include "chrome/browser/chrome_notification_types.h"
30 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 30 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
31 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 31 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
32 #include "chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.h " 32 #include "chrome/browser/chromeos/accessibility/spoken_feedback_event_rewriter.h "
33 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h" 33 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h"
34 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" 34 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
35 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 35 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
36 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification .h" 36 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification .h"
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 wallpaper::WallpaperManagerBase::SetPathIds( 518 wallpaper::WallpaperManagerBase::SetPathIds(
519 chrome::DIR_USER_DATA, 519 chrome::DIR_USER_DATA,
520 chrome::DIR_CHROMEOS_WALLPAPERS, 520 chrome::DIR_CHROMEOS_WALLPAPERS,
521 chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS); 521 chrome::DIR_CHROMEOS_CUSTOM_WALLPAPERS);
522 522
523 // Add observers for WallpaperManager. This depends on PowerManagerClient, 523 // Add observers for WallpaperManager. This depends on PowerManagerClient,
524 // TimezoneSettings and CrosSettings. 524 // TimezoneSettings and CrosSettings.
525 WallpaperManager::Initialize(); 525 WallpaperManager::Initialize();
526 WallpaperManager::Get()->AddObservers(); 526 WallpaperManager::Get()->AddObservers();
527 527
528 base::PostTaskAndReplyWithResult( 528 base::PostTaskWithTraitsAndReplyWithResult(
529 content::BrowserThread::GetBlockingPool(), 529 FROM_HERE, base::TaskTraits().MayBlock().WithPriority(
530 FROM_HERE, 530 base::TaskPriority::BACKGROUND),
531 base::Bind(&version_loader::GetVersion, 531 base::Bind(&version_loader::GetVersion, version_loader::VERSION_FULL),
532 version_loader::VERSION_FULL),
533 base::Bind(&ChromeOSVersionCallback)); 532 base::Bind(&ChromeOSVersionCallback));
534 533
535 // Make sure that wallpaper boot transition and other delays in OOBE 534 // Make sure that wallpaper boot transition and other delays in OOBE
536 // are disabled for tests and kiosk app launch by default. 535 // are disabled for tests and kiosk app launch by default.
537 // Individual tests may enable them if they want. 536 // Individual tests may enable them if they want.
538 if (parsed_command_line().HasSwitch(::switches::kTestType) || 537 if (parsed_command_line().HasSwitch(::switches::kTestType) ||
539 ShouldAutoLaunchKioskApp(parsed_command_line())) { 538 ShouldAutoLaunchKioskApp(parsed_command_line())) {
540 WizardController::SetZeroDelays(); 539 WizardController::SetZeroDelays();
541 } 540 }
542 541
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 940
942 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 941 ChromeBrowserMainPartsLinux::PostDestroyThreads();
943 942
944 // Destroy DeviceSettingsService after g_browser_process. 943 // Destroy DeviceSettingsService after g_browser_process.
945 DeviceSettingsService::Shutdown(); 944 DeviceSettingsService::Shutdown();
946 945
947 chromeos::ShutdownCloseTracking(); 946 chromeos::ShutdownCloseTracking();
948 } 947 }
949 948
950 } // namespace chromeos 949 } // 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