Commit 381beab3 authored by Peter Collingbourne's avatar Peter Collingbourne Committed by Commit Bot

chrome: Call SetUpBundleOverrides from ChromeMain.

It looks like we always need to call SetUpBundleOverrides no matter
what the process type is, so we can just call it from ChromeMain. This
will save us from needing to call this function from browser-specific
code in a later change.

While here, also remove a dead declaration.

Bug: 855193
Change-Id: I449d92ef9c7d80d066d4cfefb3015014bd407cc1
Reviewed-on: https://chromium-review.googlesource.com/1159335Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580285}
parent 30f90040
......@@ -88,14 +88,14 @@ int ChromeMain(int argc, const char** argv) {
const base::CommandLine* command_line(base::CommandLine::ForCurrentProcess());
ALLOW_UNUSED_LOCAL(command_line);
// Chrome-specific process modes.
#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
if (command_line->HasSwitch(switches::kHeadless)) {
#if defined(OS_MACOSX)
SetUpBundleOverrides();
SetUpBundleOverrides();
#endif
// Chrome-specific process modes.
#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
if (command_line->HasSwitch(switches::kHeadless))
return headless::HeadlessShellMain(params);
}
#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
int rv = content::ContentMain(params);
......
......@@ -81,7 +81,6 @@
#if defined(OS_MACOSX)
#include "base/mac/foundation_util.h"
#include "chrome/app/chrome_main_mac.h"
#include "chrome/browser/chrome_browser_application_mac.h"
#include "chrome/browser/mac/relauncher.h"
#include "chrome/browser/shell_integration.h"
......@@ -529,7 +528,6 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) {
const bool is_browser = !command_line.HasSwitch(switches::kProcessType);
ObjcEvilDoers::ZombieEnable(true, is_browser ? 10000 : 1000);
SetUpBundleOverrides();
chrome::common::mac::EnableCFBundleBlocker();
#endif
......@@ -1091,10 +1089,6 @@ ui::DataPack* ChromeMainDelegate::LoadServiceManifestDataPack() {
command_line.GetSwitchValueASCII(switches::kProcessType);
DCHECK(process_type.empty());
#if defined(OS_MACOSX)
SetUpBundleOverrides();
#endif
base::FilePath resources_pack_path;
base::PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
......
......@@ -5,14 +5,6 @@
#ifndef CHROME_APP_CHROME_MAIN_MAC_H_
#define CHROME_APP_CHROME_MAIN_MAC_H_
namespace base {
class FilePath;
}
// Checks if the UserDataDir policy has been set and returns its value in the
// |user_data_dir| parameter. If no policy is set the parameter is not changed.
void CheckUserDataDirPolicy(base::FilePath* user_data_dir);
// Sets the app bundle (base::mac::FrameworkBundle()) to the framework's bundle,
// and sets the base bundle ID (base::mac::BaseBundleID()) to the proper value
// based on the running application. The base bundle ID is the outer browser
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment