-
Notifications
You must be signed in to change notification settings - Fork 879
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 #5616 from brave/keep_extension
Fix 3650: Enable google sign in for extensions
- Loading branch information
Showing
28 changed files
with
338 additions
and
43 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
32 changes: 32 additions & 0 deletions
32
browser/resources/settings/brave_overrides/sync_account_control.js
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,32 @@ | ||
// Copyright (c) 2020 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/. | ||
|
||
import {RegisterPolymerComponentProperties, RegisterPolymerTemplateModifications} from 'chrome://brave-resources/polymer_overriding.js' | ||
|
||
RegisterPolymerTemplateModifications({ | ||
'settings-sync-account-control': (templateContent) => { | ||
const banner = templateContent.querySelector('#banner') | ||
const promo_header = templateContent.querySelector('#promo-header') | ||
if (!banner) { | ||
console.error('[Brave Settings Overrides] Could not find sync banner') | ||
return | ||
} | ||
if (!promo_header) { | ||
console.error('[Brave Settings Overrides] Could not find promo header') | ||
return | ||
} | ||
banner.hidden = true | ||
promo_header.hidden = true | ||
} | ||
}) | ||
|
||
RegisterPolymerComponentProperties({ | ||
'settings-sync-account-control': { | ||
shouldShowAvatarRow_: { | ||
type: Boolean, | ||
value: false | ||
} | ||
} | ||
}) |
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
2 changes: 2 additions & 0 deletions
2
browser/resources/settings/social_blocking_page/social_blocking_page_proxy.html
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,2 @@ | ||
<link rel="href" src="chrome://resources/html/cr.html"> | ||
<script src="social_blocking_page_proxy.js"></script> |
43 changes: 43 additions & 0 deletions
43
browser/resources/settings/social_blocking_page/social_blocking_page_proxy.js
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,43 @@ | ||
/* Copyright (c) 2020 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/. */ | ||
|
||
// clang-format off | ||
// #import {addSingletonGetter, sendWithPromise} from 'chrome://resources/js/cr.m.js'; | ||
// clang-format on | ||
|
||
cr.define('settings', function() { | ||
/** @interface */ | ||
class SocialBlockingPageProxy { | ||
/** | ||
* @param {boolean} enabled (true/false). | ||
*/ | ||
setSignInEnabledAtNextStartup(value) {} | ||
/** | ||
* @return {boolean} | ||
*/ | ||
wasSignInEnabledAtStartup() {} | ||
} | ||
|
||
/** | ||
* @implements {settings.SocialBlockingPageProxy} | ||
*/ | ||
/* #export */ class SocialBlockingPageProxyImpl { | ||
setSignInEnabledAtNextStartup(value) { | ||
chrome.settingsPrivate.setPref('signin.allowed_on_next_startup', value); | ||
} | ||
|
||
wasSignInEnabledAtStartup() { | ||
return loadTimeData.getBoolean('signInAllowedOnNextStartupInitialValue'); | ||
} | ||
} | ||
|
||
cr.addSingletonGetter(SocialBlockingPageProxyImpl); | ||
|
||
// #cr_define_end | ||
return { | ||
SocialBlockingPageProxy: SocialBlockingPageProxy, | ||
SocialBlockingPageProxyImpl: SocialBlockingPageProxyImpl, | ||
}; | ||
}); |
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,10 @@ | ||
# Copyright (c) 2019 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/. | ||
|
||
group("app") { | ||
deps = [ | ||
"//google_apis" | ||
] | ||
} |
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
7 changes: 7 additions & 0 deletions
7
...ponents/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.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,7 @@ | ||
/* Copyright (c) 2020 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 "brave/components/signin/internal/identity_manager/brave_mutable_profile_oauth2_token_service_delegate.cc" // NOLINT | ||
#include "../../../../../../components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.cc" // NOLINT |
Oops, something went wrong.