Popular sites on the NTP: re-download popular suggestions once per Chrome run
[chromium-blink-merge.git] / chrome / browser / browser_process_platform_part_base.cc
blobea65af3bdce80f30f1b9c22b78c08b2e85c01b97
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"
11 #if !defined(OS_IOS)
12 #include "chrome/browser/policy/chrome_browser_policy_connector.h"
13 #endif
14 #endif
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)
33 NOTREACHED();
34 #else
35 // On most platforms, closing all windows causes the application to exit.
36 chrome::CloseAllBrowsers();
37 #endif
40 void BrowserProcessPlatformPartBase::PreMainMessageLoopRun() {
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
54 #endif