Upstream moving mac code to apple path/namespace
Chromium change: https://chromium.googlesource.com/chromium/src/+/d4f07083522bf569bf0cc44f0d83f798aac1f146 commit d4f07083522bf569bf0cc44f0d83f798aac1f146 Author: Avi Drissman <avi@chromium.org> Date: Fri May 12 18:05:44 2023 +0000 Move backup_util and bundle_locations to base/apple Bug: 1444927
This commit is contained in:
@@ -5,13 +5,13 @@
|
||||
|
||||
#include "brave/browser/brave_shell_integration_mac.h"
|
||||
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/apple/bundle_locations.h"
|
||||
#include "chrome/browser/mac/dock.h"
|
||||
|
||||
namespace shell_integration::mac {
|
||||
|
||||
void AddIconToDock(base::OnceCallback<void(bool)> result_callback) {
|
||||
dock::AddIcon([base::mac::MainBundle() bundlePath], nullptr);
|
||||
dock::AddIcon([base::apple::MainBundle() bundlePath], nullptr);
|
||||
|
||||
std::move(result_callback)
|
||||
.Run(dock::ChromeIsInTheDock() == dock::ChromeInDockTrue);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* Copyright (c) 2023 The Brave Authors. All rights reserved.
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
* You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#import "brave/browser/mac/sparkle_glue.h"
|
||||
|
||||
@@ -8,8 +9,8 @@
|
||||
#include <sys/mount.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "base/apple/bundle_locations.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#import "base/mac/scoped_nsautorelease_pool.h"
|
||||
#import "base/mac/scoped_nsobject.h"
|
||||
@@ -156,7 +157,7 @@ class PerformBridge : public base::RefCountedThreadSafe<PerformBridge> {
|
||||
DCHECK(!su_updater_);
|
||||
|
||||
NSString* sparkle_path =
|
||||
[[base::mac::FrameworkBundle() privateFrameworksPath]
|
||||
[[base::apple::FrameworkBundle() privateFrameworksPath]
|
||||
stringByAppendingPathComponent:@"Sparkle.framework"];
|
||||
DCHECK(sparkle_path);
|
||||
|
||||
@@ -285,7 +286,7 @@ class PerformBridge : public base::RefCountedThreadSafe<PerformBridge> {
|
||||
}
|
||||
|
||||
- (void)loadParameters {
|
||||
NSBundle* appBundle = base::mac::OuterBundle();
|
||||
NSBundle* appBundle = base::apple::OuterBundle();
|
||||
NSString* appPath = [appBundle bundlePath];
|
||||
if (!appPath) {
|
||||
// If parameters required for sparkle are missing, don't use it.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "chrome/browser/shell_integration.h"
|
||||
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/apple/bundle_locations.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/mac/mac_util.h"
|
||||
#include "base/mac/scoped_cftyperef.h"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
/* Copyright (c) 2023 The Brave Authors. All rights reserved.
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "chrome/common/channel_info.h"
|
||||
|
||||
@@ -8,7 +9,7 @@
|
||||
|
||||
#include <tuple>
|
||||
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/apple/bundle_locations.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "components/version_info/version_info.h"
|
||||
@@ -20,7 +21,7 @@ std::string GetChannelName(WithExtendedStable with_extended_stable) {
|
||||
static const base::NoDestructor<std::string> channel([] {
|
||||
// Use the main Chrome application bundle and not the framework bundle.
|
||||
// Keystone keys don't live in the framework.
|
||||
NSBundle* bundle = base::mac::OuterBundle();
|
||||
NSBundle* bundle = base::apple::OuterBundle();
|
||||
|
||||
NSString* channel = [bundle objectForInfoDictionaryKey:@"KSChannelID"];
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "chrome/common/chrome_version.h"
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/apple/bundle_locations.h"
|
||||
#include "chrome/common/chrome_constants.h"
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -11,9 +11,9 @@
|
||||
#include <SystemConfiguration/SystemConfiguration.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include "base/apple/bundle_locations.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/mac/scoped_cftyperef.h"
|
||||
#include "base/notreached.h"
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#include "base/apple/bundle_locations.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/i18n/icu_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
@@ -151,7 +151,7 @@ const BraveCoreLogSeverity BraveCoreLogSeverityVerbose =
|
||||
ios::DIR_USER_DATA, ios::DIR_USER_DATA, ios::DIR_USER_DATA);
|
||||
}
|
||||
|
||||
NSBundle* baseBundle = base::mac::OuterBundle();
|
||||
NSBundle* baseBundle = base::apple::OuterBundle();
|
||||
base::mac::SetBaseBundleID(
|
||||
base::SysNSStringToUTF8([baseBundle bundleIdentifier]).c_str());
|
||||
|
||||
@@ -492,8 +492,8 @@ static bool CustomLogHandler(int severity,
|
||||
+ (bool)initializeICUForTesting {
|
||||
base::FilePath path;
|
||||
base::PathService::Get(base::DIR_MODULE, &path);
|
||||
base::mac::SetOverrideFrameworkBundlePath(path);
|
||||
base::mac::SetOverrideOuterBundlePath(path);
|
||||
base::apple::SetOverrideFrameworkBundlePath(path);
|
||||
base::apple::SetOverrideOuterBundlePath(path);
|
||||
return base::i18n::InitializeICU();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
#include "brave/ios/app/brave_main_delegate.h"
|
||||
|
||||
#include "base/apple/bundle_locations.h"
|
||||
#include "base/base_paths.h"
|
||||
#include "base/base_switches.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/path_service.h"
|
||||
#include "brave/components/brave_component_updater/browser/brave_component.h"
|
||||
#include "brave/components/brave_component_updater/browser/features.h"
|
||||
@@ -44,8 +44,8 @@ std::string GetUpdateURLHost() {
|
||||
BraveMainDelegate::BraveMainDelegate() {
|
||||
base::FilePath path;
|
||||
base::PathService::Get(base::DIR_MODULE, &path);
|
||||
base::mac::SetOverrideFrameworkBundlePath(path);
|
||||
base::mac::SetOverrideOuterBundlePath(path);
|
||||
base::apple::SetOverrideFrameworkBundlePath(path);
|
||||
base::apple::SetOverrideOuterBundlePath(path);
|
||||
}
|
||||
|
||||
BraveMainDelegate::~BraveMainDelegate() {}
|
||||
|
||||
Reference in New Issue
Block a user