Commit 9e94105a authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

[WebLayer] Allow GoogleAccountsCallback to be called in incognito

This allows a client to block signin in incognito.

Bug: 1138458
Change-Id: I724a4dace1cdb6fc1c38f0640c344a12d4482021
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2470467
Commit-Queue: Clark DuVall <cduvall@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817087}
parent e5aa877e
...@@ -219,11 +219,13 @@ class IncognitoGoogleAccountsBrowserTest : public GoogleAccountsBrowserTest { ...@@ -219,11 +219,13 @@ class IncognitoGoogleAccountsBrowserTest : public GoogleAccountsBrowserTest {
}; };
IN_PROC_BROWSER_TEST_F(IncognitoGoogleAccountsBrowserTest, IN_PROC_BROWSER_TEST_F(IncognitoGoogleAccountsBrowserTest,
HeaderNotAddedForIncognitoBrowser) { HeaderAddedForIncognitoBrowser) {
const std::string path = const std::string path =
base::StrCat({"/echoheader?", signin::kChromeConnectedHeader}); base::StrCat({"/echoheader?", signin::kChromeConnectedHeader});
NavigateAndWaitForCompletion(GetGaiaURL(path), shell()); NavigateAndWaitForCompletion(GetGaiaURL(path), shell());
EXPECT_EQ(GetBody(), "None"); EXPECT_EQ(GetBody(),
"source=WebLayer,mode=3,enable_account_consistency=true,"
"consistency_enabled_by_default=false");
} }
} // namespace weblayer } // namespace weblayer
...@@ -60,7 +60,7 @@ SigninURLLoaderThrottle::~SigninURLLoaderThrottle() = default; ...@@ -60,7 +60,7 @@ SigninURLLoaderThrottle::~SigninURLLoaderThrottle() = default;
std::unique_ptr<SigninURLLoaderThrottle> SigninURLLoaderThrottle::Create( std::unique_ptr<SigninURLLoaderThrottle> SigninURLLoaderThrottle::Create(
content::BrowserContext* browser_context, content::BrowserContext* browser_context,
content::WebContents::Getter web_contents_getter) { content::WebContents::Getter web_contents_getter) {
if (browser_context->IsOffTheRecord() || !GetDelegate(web_contents_getter)) if (!GetDelegate(web_contents_getter))
return nullptr; return nullptr;
// Use base::WrapUnique + new because of the constructor is private. // Use base::WrapUnique + new because of the constructor is private.
......
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