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
3 // found in the LICENSE file.
5 #include "chrome/browser/browser_process_platform_part_base.h"
7 #include "base/notreached.h"
8 #include "build/build_config.h"
9 #include "chrome/browser/lifetime/application_lifetime.h"
10 #include "chrome/browser/policy/chrome_browser_policy_connector.h"
11 #include "components/policy/core/browser/browser_policy_connector.h"
13 BrowserProcessPlatformPartBase::BrowserProcessPlatformPartBase() {
16 BrowserProcessPlatformPartBase::~BrowserProcessPlatformPartBase() {
19 void BrowserProcessPlatformPartBase::PlatformSpecificCommandLineProcessing(
20 const base::CommandLine& /* command_line */) {
23 void BrowserProcessPlatformPartBase::StartTearDown() {
26 void BrowserProcessPlatformPartBase::AttemptExit(bool try_to_quit_application) {
27 // chrome::CloseAllBrowsers() doesn't link on OS_ANDROID, but it overrides this
29 #if defined(OS_ANDROID)
32 // On most platforms, closing all windows causes the application to exit.
33 chrome::CloseAllBrowsers();
37 void BrowserProcessPlatformPartBase::PreMainMessageLoopRun() {
40 std::unique_ptr<policy::ChromeBrowserPolicyConnector>
41 BrowserProcessPlatformPartBase::CreateBrowserPolicyConnector() {
42 return std::make_unique<policy::ChromeBrowserPolicyConnector>();