forked from brave/brave-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request brave#468 from brave/patch-cleanup
Removes a dozen patches in favour of chromium_src override
- Loading branch information
Showing
29 changed files
with
220 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* 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/. */ | ||
|
||
#include "brave/browser/extensions/brave_extension_service.h" | ||
#include "chrome/browser/extensions/api/content_settings/content_settings_service.h" | ||
#include "chrome/browser/profiles/profile.h" | ||
|
||
namespace extensions { | ||
|
||
BraveExtensionService::BraveExtensionService(Profile* profile, | ||
const base::CommandLine* command_line, | ||
const base::FilePath& install_directory, | ||
ExtensionPrefs* extension_prefs, | ||
Blacklist* blacklist, | ||
bool autoupdate_enabled, | ||
bool extensions_enabled, | ||
OneShotEvent* ready) : | ||
ExtensionService(profile, command_line, install_directory, extension_prefs, | ||
blacklist, autoupdate_enabled, extensions_enabled, ready) { | ||
} | ||
|
||
BraveExtensionService::~BraveExtensionService() { | ||
} | ||
|
||
void BraveExtensionService::AddComponentExtension(const Extension* extension) { | ||
ExtensionService::AddComponentExtension(extension); | ||
|
||
// ContentSettingsStore::RegisterExtension is only called for default components | ||
// on the first run with a fresh profile. All restarts of the browser after that do not call it. | ||
// This causes ContentSettingsStore's `entries_` to never insert the component ID | ||
// and then ContentSettingsStore::GetValueMap always returns nullptr. | ||
// I don't think Chromium is affected by this simply because they don't use content settings | ||
// from default component extensions. | ||
extension_prefs_->OnExtensionInstalled(extension, Extension::ENABLED, | ||
syncer::StringOrdinal(), | ||
extensions::kInstallFlagNone, | ||
std::string(), | ||
base::nullopt); | ||
extensions::ContentSettingsService::Get(profile_)->OnExtensionPrefsLoaded( | ||
extension->id(), extension_prefs_); | ||
} | ||
|
||
} // namespace extensions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* 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/. */ | ||
|
||
#ifndef BRAVE_BROWSER_EXTENSIONS_BRAVE_EXTENSION_SERVICE_H_ | ||
#define BRAVE_BROWSER_EXTENSIONS_BRAVE_EXTENSION_SERVICE_H_ | ||
|
||
#include "chrome/browser/extensions/extension_service.h" | ||
|
||
namespace extensions { | ||
|
||
class BraveExtensionService : public ExtensionService { | ||
public: | ||
// Constructor stores pointers to |profile| and |extension_prefs| but | ||
// ownership remains at caller. | ||
BraveExtensionService(Profile* profile, | ||
const base::CommandLine* command_line, | ||
const base::FilePath& install_directory, | ||
ExtensionPrefs* extension_prefs, | ||
Blacklist* blacklist, | ||
bool autoupdate_enabled, | ||
bool extensions_enabled, | ||
OneShotEvent* ready); | ||
~BraveExtensionService() override; | ||
|
||
void AddComponentExtension(const Extension* extension) override; | ||
|
||
DISALLOW_COPY_AND_ASSIGN(BraveExtensionService); | ||
}; | ||
|
||
} // namespace extensions | ||
|
||
#endif // BRAVE_BROWSER_EXTENSIONS_BRAVE_EXTENSION_SERVICE_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* 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/. */ | ||
|
||
#ifndef BRAVE_CHROMIUM_SRC_CHROME_APP_CHROME_COMMAND_IDS_H_ | ||
#define BRAVE_CHROMIUM_SRC_CHROME_APP_CHROME_COMMAND_IDS_H_ | ||
|
||
#include "brave/app/brave_command_ids.h" | ||
#include "../../../../chrome/app/chrome_command_ids.h" | ||
|
||
#endif // BRAVE_CHROMIUM_SRC_CHROME_APP_CHROME_COMMAND_IDS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* 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/. */ | ||
|
||
#include "brave/app/brave_main_delegate.h" | ||
|
||
#define ChromeMainDelegate BraveMainDelegate | ||
#include "../../../../chrome/app/chrome_main.cc" | ||
#undef ChromeMainDelegate |
15 changes: 15 additions & 0 deletions
15
chromium_src/chrome/browser/autocomplete/autocomplete_classifier_factory.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* 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/. */ | ||
|
||
#include "brave/browser/autocomplete/brave_autocomplete_scheme_classifier.h" | ||
#include "brave/components/omnibox/browser/brave_autocomplete_controller.h" | ||
#include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" | ||
#include "components/omnibox/browser/autocomplete_classifier.h" | ||
#include "components/omnibox/browser/autocomplete_controller.h" | ||
|
||
#define AutocompleteController BraveAutocompleteController | ||
#define ChromeAutocompleteSchemeClassifier BraveAutocompleteSchemeClassifier | ||
#include "../../../../../chrome/browser/autocomplete/autocomplete_classifier_factory.cc" | ||
#undef ChromeAutocompleteSchemeClassifier | ||
#undef AutocompleteController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* 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/. */ | ||
|
||
#include "brave/components/brave_shields/browser/brave_resource_dispatcher_host_delegate.h" | ||
|
||
#define ChromeResourceDispatcherHostDelegate BraveResourceDispatcherHostDelegate | ||
#include "../../../../chrome/browser/browser_process_impl.cc" | ||
#undef ChromeResourceDispatcherHostDelegate |
11 changes: 11 additions & 0 deletions
11
chromium_src/chrome/browser/extensions/extension_service.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* 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/. */ | ||
|
||
#include "brave/browser/extensions/brave_component_loader.h" | ||
#include "chrome/browser/extensions/component_loader.h" | ||
#include "chrome/browser/extensions/extension_service.h" | ||
|
||
#define ComponentLoader BraveComponentLoader | ||
#include "../../../../../chrome/browser/extensions/extension_service.cc" | ||
#undef ComponentLoader |
11 changes: 11 additions & 0 deletions
11
chromium_src/chrome/browser/extensions/extension_system_impl.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* 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/. */ | ||
|
||
#include "brave/browser/extensions/brave_extension_service.h" | ||
#include "chrome/browser/extensions/crx_installer.h" | ||
#include "chrome/browser/extensions/update_install_gate.h" | ||
|
||
#define ExtensionService BraveExtensionService | ||
#include "../../../../../chrome/browser/extensions/extension_system_impl.cc" | ||
#undef ExtensionService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* 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/. */ | ||
|
||
#include "brave/browser/net/brave_system_network_delegate.h" | ||
|
||
#define ChromeNetworkDelegate BraveSystemNetworkDelegate | ||
#include "../../../../chrome/browser/io_thread.cc" | ||
#undef ChromeNetworkDelegate |
10 changes: 10 additions & 0 deletions
10
chromium_src/chrome/browser/ui/app_list/search/omnibox_provider.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* 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/. */ | ||
|
||
#include "brave/components/omnibox/browser/brave_autocomplete_controller.h" | ||
#include "components/omnibox/browser/autocomplete_controller.h" | ||
|
||
#define AutocompleteController BraveAutocompleteController | ||
#include "../../../../../../../chrome/browser/ui/app_list/search/omnibox_provider.cc" | ||
#undef AutocompleteController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* 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/. */ | ||
|
||
#include "chrome/browser/ui/browser_command_controller.h" | ||
#include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" | ||
#include "brave/browser/ui/brave_browser_content_setting_bubble_model_delegate.h" | ||
#include "brave/browser/ui/brave_browser_command_controller.h" | ||
|
||
#define BrowserContentSettingBubbleModelDelegate BraveBrowserContentSettingBubbleModelDelegate | ||
#define BrowserCommandController BraveBrowserCommandController | ||
#include "../../../../../chrome/browser/ui/browser.cc" | ||
#undef BrowserContentSettingBubbleModelDelegate | ||
#undef BrowserCommandController |
11 changes: 11 additions & 0 deletions
11
chromium_src/chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* 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/. */ | ||
|
||
#include "brave/components/omnibox/browser/brave_autocomplete_controller.h" | ||
#include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" | ||
#include "components/omnibox/browser/autocomplete_controller.h" | ||
|
||
#define AutocompleteController BraveAutocompleteController | ||
#include "../../../../../../../chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc" | ||
#undef AutocompleteController |
10 changes: 10 additions & 0 deletions
10
chromium_src/components/omnibox/browser/omnibox_controller.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* 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/. */ | ||
|
||
#include "brave/components/omnibox/browser/brave_autocomplete_controller.h" | ||
#include "components/omnibox/browser/autocomplete_controller.h" | ||
|
||
#define AutocompleteController BraveAutocompleteController | ||
#include "../../../../../../../components/omnibox/browser/omnibox_controller.cc" | ||
#undef AutocompleteController |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
patches/chrome-browser-android-omnibox-autocomplete_controller_android.cc.patch
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
patches/chrome-browser-autocomplete-autocomplete_classifier_factory.cc.patch
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.