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 "base/logging.h"
6 #include "chrome/browser/browser_process_platform_part_base.h"
7 #include "chrome/browser/lifetime/application_lifetime.h"
9 #if defined(ENABLE_CONFIGURATION_POLICY)
10 #include "components/policy/core/browser/browser_policy_connector.h"
12 #include "chrome/browser/policy/chrome_browser_policy_connector.h"
16 BrowserProcessPlatformPartBase::BrowserProcessPlatformPartBase() {
19 BrowserProcessPlatformPartBase::~BrowserProcessPlatformPartBase() {
22 void BrowserProcessPlatformPartBase::PlatformSpecificCommandLineProcessing(
23 const base::CommandLine
& /* command_line */) {
26 void BrowserProcessPlatformPartBase::StartTearDown() {
29 void BrowserProcessPlatformPartBase::AttemptExit() {
30 // chrome::CloseAllBrowsers() doesn't link on OS_IOS and OS_ANDROID, but
31 // OS_ANDROID overrides this method already and OS_IOS never calls this.
32 #if defined(OS_IOS) || defined(OS_ANDROID)
35 // On most platforms, closing all windows causes the application to exit.
36 chrome::CloseAllBrowsers();
40 void BrowserProcessPlatformPartBase::PreMainMessageLoopRun() {
43 #if defined(ENABLE_CONFIGURATION_POLICY)
44 scoped_ptr
<policy::BrowserPolicyConnector
>
45 BrowserProcessPlatformPartBase::CreateBrowserPolicyConnector() {
48 return scoped_ptr
<policy::BrowserPolicyConnector
>();
50 return scoped_ptr
<policy::BrowserPolicyConnector
>(
51 new policy::ChromeBrowserPolicyConnector());