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

Side by Side Diff: content/app/content_service_manager_main_delegate.cc

Issue 2763883002: Revert of Move some basic early process init into Service Manager (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « content/app/content_service_manager_main_delegate.h ('k') | content/app/mac/mac_init.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/app/content_service_manager_main_delegate.h"
6
7 #include "content/public/app/content_main_runner.h"
8
9 namespace content {
10
11 ContentServiceManagerMainDelegate::ContentServiceManagerMainDelegate(
12 const ContentMainParams& params)
13 : content_main_params_(params),
14 content_main_runner_(ContentMainRunner::Create()) {}
15
16 ContentServiceManagerMainDelegate::~ContentServiceManagerMainDelegate() =
17 default;
18
19 int ContentServiceManagerMainDelegate::Initialize(
20 const InitializeParams& params) {
21 #if defined(OS_ANDROID)
22 // May be called twice on Android due to the way browser startup requests are
23 // dispatched by the system.
24 if (initialized_)
25 return -1;
26 #endif
27
28 #if defined(OS_MACOSX)
29 content_main_params_.autorelease_pool = params.autorelease_pool;
30 #endif
31
32 return content_main_runner_->Initialize(content_main_params_);
33 }
34
35 int ContentServiceManagerMainDelegate::Run() {
36 return content_main_runner_->Run();
37 }
38
39 void ContentServiceManagerMainDelegate::ShutDown() {
40 #if !defined(OS_ANDROID)
41 content_main_runner_->Shutdown();
42 #endif
43 }
44
45 } // namespace content
OLDNEW
« no previous file with comments | « content/app/content_service_manager_main_delegate.h ('k') | content/app/mac/mac_init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698