Reland "Clear managed profile on start-up if having a primary account is not allowed."
This reverts commit b04e513f825d6ce22e147601cbfc75ea23eb9073.
Reason for revert:
This CL contains changes only for Windows, Linux and macOS (if you look
at the main changes in signin_util.{h|cc} file, you'll see they are ifdefed out on ChromeOS.
Browser test from the same test suite (WebviewClientCertsLoginTest) failed already at the
previous build on the same target:
* Build that fails a tests from WebviewClientCertsLoginTest and that does not include my CL:
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20ChromiumOS%20MSan%20Tests/9853
* Build that fails a test from WebviewClientCertsLoginTest and that includes my CL:
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20ChromiumOS%20MSan%20Tests/9854
Original change's description:
> Revert "Clear managed profile on start-up if having a primary account is not allowed."
>
> This reverts commit e98161eb3fcb6d04c6fabe32e4048a188dd70f19.
>
> Reason for revert: Sheriff suspecting this change is responsible for test failures https://crbug.com/909034 -- if not, please reland apologies for the trouble!
>
> Original change's description:
> > Clear managed profile on start-up if having a primary account is not allowed.
> >
> > This CL clears the profile when it is loaded is the primary account is no longer
> > allowed (e.g. profile was marked as a managed profile or the profile).
> >
> > As this is a very destructive action (the profile directory is removed from disk),
> > the user is presented with a permanent browser modal dialog.
> >
> > Screenshots for each platform:
> > Linux: https://drive.google.com/open?id=1HO693VkDnC0qjPxHJdFZr3CPqOs2Hidf
> > Windows: https://drive.google.com/open?id=1gvmvt2wUsA42nmcVWTZCB1F5encHJRRH
> >
> > Design doc [Google internal only]:
> > https://docs.google.com/document/d/1QqWoV1I7WgrzeHJwm9agG56ZqXD_Q2L3LB3K7Ck89GI/edit?usp=sharing
> >
> > Bug: 907474, 887756
> >
> > Change-Id: Ib1187d79a45e0829b57768582c5d11126b0a5c46
> > Reviewed-on: https://chromium-review.googlesource.com/c/1288829
> > Commit-Queue: Mihai Sardarescu <[email protected]>
> > Reviewed-by: Julian Pastarmov <[email protected]>
> > Reviewed-by: Elly Fong-Jones <[email protected]>
> > Reviewed-by: David Roger <[email protected]>
> > Reviewed-by: Owen Min <[email protected]>
> > Cr-Commit-Position: refs/heads/master@{#611135}
>
> [email protected],[email protected],[email protected],[email protected],[email protected]
>
> Change-Id: I0c1468ce16d832ec57de9c456e1642e054fe9cfa
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 907474, 887756
> Reviewed-on: https://chromium-review.googlesource.com/c/1352646
> Reviewed-by: Ken Rockot <[email protected]>
> Commit-Queue: Ken Rockot <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#611432}
[email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
Change-Id: I6da34b30e8c740b48da32cba4be3fcac5e5e6ea0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 907474, 887756
Reviewed-on: https://chromium-review.googlesource.com/c/1352360
Commit-Queue: Mihai Sardarescu <[email protected]>
Reviewed-by: Mihai Sardarescu <[email protected]>
Reviewed-by: Julian Pastarmov <[email protected]>
Reviewed-by: David Roger <[email protected]>
Cr-Commit-Position: refs/heads/master@{#611642}
diff --git a/chrome/browser/ui/simple_message_box.h b/chrome/browser/ui/simple_message_box.h
index 6a8a7c8..7077891 100644
--- a/chrome/browser/ui/simple_message_box.h
+++ b/chrome/browser/ui/simple_message_box.h
@@ -34,12 +34,16 @@
// non-NULL, the box will be made modal to the |parent|, except on Mac, where it
// is always app-modal.
//
+// If |can_close| is false, then this dialog will not show the close button and
+// the dialog will only be dismissed when the user presses the OK button.
+//
// NOTE: In general, you should avoid this since it's usually poor UI.
// We have a variety of other surfaces such as app menu notifications and
// infobars; consult the UI leads for a recommendation.
void ShowWarningMessageBox(gfx::NativeWindow parent,
const base::string16& title,
- const base::string16& message);
+ const base::string16& message,
+ bool can_close = true);
// As above, but shows the dialog box asynchronously with a checkbox.
// |callback| will be invoked after the dialog is dismissed. It is invoked with