Commit 7a07960a authored by Kunihiko Sakamoto's avatar Kunihiko Sakamoto Committed by Commit Bot

Revert "chrome: Call SetUpBundleOverrides from ChromeMain."

This reverts commit 381beab3.

Reason for revert: Suspected of breaking browser_tests on Mac. crbug.com/870579

Original change's description:
> 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/1159335
> Reviewed-by: Robert Sesek <rsesek@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#580285}

TBR=avi@chromium.org,pcc@chromium.org,rsesek@chromium.org,mark@chromium.org

Change-Id: I32f905ff8f82306a85fbc9798652b8c99aa46009
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 855193,870579
Reviewed-on: https://chromium-review.googlesource.com/1161722Reviewed-by: default avatarKunihiko Sakamoto <ksakamoto@chromium.org>
Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580456}
parent 1f637a1a
......@@ -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,6 +81,7 @@
#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"
......@@ -528,6 +529,7 @@ 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
......@@ -1089,6 +1091,10 @@ 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,6 +5,14 @@
#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