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. 4 5 #include "base/logging.h" 6 #include "chrome/browser/browser_process_platform_part_base.h" 7 #include "chrome/browser/lifetime/application_lifetime.h" 8 9 #if defined(ENABLE_CONFIGURATION_POLICY) 10 #include "components/policy/core/browser/browser_policy_connector.h" 11 #if !defined(OS_IOS) 12 #include "chrome/browser/policy/chrome_browser_policy_connector.h" 13 #endif 14 #endif 15 16 BrowserProcessPlatformPartBase::BrowserProcessPlatformPartBase() { 17 } 18 19 BrowserProcessPlatformPartBase::~BrowserProcessPlatformPartBase() { 20 } 21 22 void BrowserProcessPlatformPartBase::PlatformSpecificCommandLineProcessing( 23 const base::CommandLine& /* command_line */) { 24 } 25 26 void BrowserProcessPlatformPartBase::StartTearDown() { 27 } 28 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) 33 NOTREACHED(); 34 #else 35 // On most platforms, closing all windows causes the application to exit. 36 chrome::CloseAllBrowsers(); 37 #endif 38 } 39 40 void BrowserProcessPlatformPartBase::PreMainMessageLoopRun() { 41 } 42 43 #if defined(ENABLE_CONFIGURATION_POLICY) 44 scoped_ptr<policy::BrowserPolicyConnector> 45 BrowserProcessPlatformPartBase::CreateBrowserPolicyConnector() { 46 #if defined(OS_IOS) 47 NOTREACHED(); 48 return scoped_ptr<policy::BrowserPolicyConnector>(); 49 #else 50 return scoped_ptr<policy::BrowserPolicyConnector>( 51 new policy::ChromeBrowserPolicyConnector()); 52 #endif 53 } 54 #endif 55