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

Unified Diff: content/public/app/content_main.h

Issue 2613653003: Move some basic early process init into Service Manager (Closed)
Patch Set: fix mac shutdown order Created 3 years, 9 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 | « content/common/set_process_title_linux.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/app/content_main.h
diff --git a/content/public/app/content_main.h b/content/public/app/content_main.h
index 0c718bf3a0901df92e7844c00672deb8ff042b73..6305501969ffe1adcdc5942970943afdc3abc5fe 100644
--- a/content/public/app/content_main.h
+++ b/content/public/app/content_main.h
@@ -19,6 +19,12 @@
#include "ui/aura/env.h"
#endif
+namespace base {
+namespace mac {
+class ScopedNSAutoreleasePool;
+}
+}
+
namespace sandbox {
struct SandboxInterfaceInfo;
}
@@ -28,37 +34,33 @@ class ContentMainDelegate;
struct ContentMainParams {
explicit ContentMainParams(ContentMainDelegate* delegate)
- : delegate(delegate),
-#if defined(OS_WIN)
- instance(NULL),
- sandbox_info(NULL),
-#elif !defined(OS_ANDROID)
- argc(0),
- argv(NULL),
-#endif
- ui_task(NULL) {
- }
+ : delegate(delegate) {}
ContentMainDelegate* delegate;
#if defined(OS_WIN)
- HINSTANCE instance;
+ HINSTANCE instance = nullptr;
// |sandbox_info| should be initialized using InitializeSandboxInfo from
// content_main_win.h
- sandbox::SandboxInterfaceInfo* sandbox_info;
+ sandbox::SandboxInterfaceInfo* sandbox_info = nullptr;
#elif !defined(OS_ANDROID)
- int argc;
- const char** argv;
+ int argc = 0;
+ const char** argv = nullptr;
#endif
// Used by browser_tests. If non-null BrowserMain schedules this task to run
// on the MessageLoop. It's owned by the test code.
- base::Closure* ui_task;
+ base::Closure* ui_task = nullptr;
#if defined(USE_AURA)
aura::Env::Mode env_mode = aura::Env::Mode::LOCAL;
#endif
+
+#if defined(OS_MACOSX)
+ // The outermost autorelease pool to pass to main entry points.
+ base::mac::ScopedNSAutoreleasePool* autorelease_pool = nullptr;
+#endif
};
#if defined(OS_ANDROID)
« no previous file with comments | « content/common/set_process_title_linux.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698