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

Unified Diff: chrome/browser/chrome_browser_main_linux.cc

Issue 297023002: Cleanup: Convert chrome_browser_main_linux.cc to use the blocking thread pool. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/sxs_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main_linux.cc
===================================================================
--- chrome/browser/chrome_browser_main_linux.cc (revision 272375)
+++ chrome/browser/chrome_browser_main_linux.cc (working copy)
@@ -4,33 +4,16 @@
#include "chrome/browser/chrome_browser_main_linux.h"
-#include <stdlib.h>
-
-#include "base/command_line.h"
-#include "base/linux_util.h"
-#include "base/prefs/pref_service.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/metrics/metrics_service.h"
-#include "chrome/common/chrome_switches.h"
-#include "chrome/common/env_vars.h"
-#include "chrome/common/pref_names.h"
#include "components/breakpad/app/breakpad_linux.h"
#if !defined(OS_CHROMEOS)
+#include "base/linux_util.h"
#include "chrome/browser/sxs_linux.h"
#include "content/public/browser/browser_thread.h"
#endif
-namespace {
-
-#if !defined(OS_CHROMEOS)
-void GetLinuxDistroCallback() {
- base::GetLinuxDistro(); // Initialize base::linux_distro if needed.
-}
-#endif
-
-} // namespace
-
ChromeBrowserMainPartsLinux::ChromeBrowserMainPartsLinux(
const content::MainFunctionParams& parameters)
: ChromeBrowserMainPartsPosix(parameters) {
@@ -43,12 +26,12 @@
#if !defined(OS_CHROMEOS)
// Needs to be called after we have chrome::DIR_USER_DATA and
// g_browser_process. This happens in PreCreateThreads.
- content::BrowserThread::PostTask(content::BrowserThread::FILE,
- FROM_HERE,
- base::Bind(&GetLinuxDistroCallback));
+ // base::GetLinuxDistro() will initialize its value if needed.
+ content::BrowserThread::PostBlockingPoolTask(
+ FROM_HERE,
+ base::Bind(base::IgnoreResult(&base::GetLinuxDistro)));
- content::BrowserThread::PostTask(
- content::BrowserThread::FILE,
+ content::BrowserThread::PostBlockingPoolTask(
FROM_HERE,
base::Bind(&sxs_linux::AddChannelMarkToUserDataDir));
#endif
« no previous file with comments | « no previous file | chrome/browser/sxs_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698