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

Unified Diff: chrome/browser/chrome_browser_main.h

Issue 8477004: Have content/ create and destroy its own threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: With this patchset, Chrome runs and exits normally on Linux. Created 9 years, 1 month 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/chrome_browser_main.h
diff --git a/chrome/browser/chrome_browser_main.h b/chrome/browser/chrome_browser_main.h
index 867b14cb0f49f90f34bf76ce44a8fc9de6f3b89f..76855e9d141a7c71b0a8480444a7cdc5f9f84a4f 100644
--- a/chrome/browser/chrome_browser_main.h
+++ b/chrome/browser/chrome_browser_main.h
@@ -13,7 +13,9 @@
#include "base/tracked_objects.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/process_singleton.h"
+#include "chrome/browser/ui/browser_init.h"
#include "content/public/browser/browser_main_parts.h"
+#include "content/public/browser/browser_thread.h"
class BrowserInit;
class BrowserProcessImpl;
@@ -36,6 +38,7 @@ class TrackingSynchronizer;
}
namespace content {
+class IOThreadDelegate;
struct MainFunctionParams;
}
@@ -65,9 +68,13 @@ class ChromeBrowserMainParts : public content::BrowserMainParts {
virtual void ToolkitInitialized() OVERRIDE;
virtual void PreMainMessageLoopStart() OVERRIDE;
virtual void PostMainMessageLoopStart() OVERRIDE;
- virtual void PreMainMessageLoopRun() OVERRIDE;
+ virtual content::IOThreadDelegate* PreMainMessageLoopRun() OVERRIDE;
+ virtual void PreMainMessageLoopRunThreadsCreated() OVERRIDE;
virtual bool MainMessageLoopRun(int* result_code) OVERRIDE;
virtual void PostMainMessageLoopRun() OVERRIDE;
+ virtual void PreStopThread(content::BrowserThread::ID identifier) OVERRIDE;
+ virtual void PostStopThread(content::BrowserThread::ID identifier) OVERRIDE;
+ virtual void FinalCleanup() OVERRIDE;
// Displays a warning message that we can't find any locale data files.
virtual void ShowMissingLocaleMessageBox() = 0;
@@ -115,6 +122,7 @@ class ChromeBrowserMainParts : public content::BrowserMainParts {
// Methods for Main Message Loop -------------------------------------------
int PreMainMessageLoopRunImpl();
+ int PreMainMessageLoopRunThreadsCreatedImpl();
void StartBrowserOrUITask();
// Members initialized on construction ---------------------------------------
@@ -155,6 +163,17 @@ class ChromeBrowserMainParts : public content::BrowserMainParts {
// Initialized in SetupMetricsAndFieldTrials.
scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_;
+ // Members initialized in PreMainMessageLoopRun, needed in
+ // PreMainMessageLoopRunThreadsCreated.
+ bool is_first_run_;
+ bool first_run_ui_bypass_;
+ MetricsService* metrics_;
+ PrefService* local_state_;
+ FilePath user_data_dir_;
+
+ // Members needed across shutdown methods.
+ bool restart_last_session_;
+
FRIEND_TEST(BrowserMainTest, WarmConnectionFieldTrial_WarmestSocket);
FRIEND_TEST(BrowserMainTest, WarmConnectionFieldTrial_Random);
FRIEND_TEST(BrowserMainTest, WarmConnectionFieldTrial_Invalid);

Powered by Google App Engine
This is Rietveld 408576698