-
Notifications
You must be signed in to change notification settings - Fork 905
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #17462 - Refactor component-updater URL overwrites
- Loading branch information
Showing
20 changed files
with
125 additions
and
151 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
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
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
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
26 changes: 26 additions & 0 deletions
26
chromium_src/components/update_client/protocol_serializer.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,26 @@ | ||
/* Copyright (c) 2021 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/. */ | ||
|
||
#include "components/update_client/protocol_serializer.h" | ||
|
||
#define BuildUpdateCheckExtraRequestHeaders \ | ||
BuildUpdateCheckExtraRequestHeaders_ChromiumImpl | ||
#include "../../../../components/update_client/protocol_serializer.cc" | ||
#undef BuildUpdateCheckExtraRequestHeaders | ||
|
||
namespace update_client { | ||
|
||
base::flat_map<std::string, std::string> BuildUpdateCheckExtraRequestHeaders( | ||
const std::string& prod_id, | ||
const base::Version& browser_version, | ||
const std::vector<std::string>& ids, | ||
bool is_foreground) { | ||
auto headers = BuildUpdateCheckExtraRequestHeaders_ChromiumImpl( | ||
prod_id, browser_version, ids, is_foreground); | ||
headers.insert({"BraveServiceKey", BRAVE_SERVICES_KEY}); | ||
return headers; | ||
} | ||
|
||
} // namespace update_client |
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,20 @@ | ||
/* Copyright (c) 2021 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/. */ | ||
|
||
#include "extensions/common/extension_urls.h" | ||
|
||
#include "brave/components/brave_component_updater/browser/brave_component.h" | ||
|
||
#define GetDefaultWebstoreUpdateUrl GetDefaultWebstoreUpdateUrl_ChromiumImpl | ||
#include "../../../../extensions/common/extension_urls.cc" | ||
#undef GetDefaultWebstoreUpdateUrl | ||
|
||
namespace extension_urls { | ||
|
||
GURL GetDefaultWebstoreUpdateUrl() { | ||
return GURL(brave_component_updater::GetUpdateURLHost()); | ||
} | ||
|
||
} // namespace extension_urls |
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
Oops, something went wrong.