Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: chrome/browser/ui/webui/signin/signin_create_profile_handler.cc

Issue 2552473002: Display error message when user try to open a locked supervised user profile when force-sign-in is … (Closed)
Patch Set: sky's comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/signin/signin_create_profile_handler.h" 5 #include "chrome/browser/ui/webui/signin/signin_create_profile_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 profiles::OpenBrowserWindowForProfile( 422 profiles::OpenBrowserWindowForProfile(
423 base::Bind(&SigninCreateProfileHandler::OnBrowserReadyCallback, 423 base::Bind(&SigninCreateProfileHandler::OnBrowserReadyCallback,
424 weak_ptr_factory_.GetWeakPtr()), 424 weak_ptr_factory_.GetWeakPtr()),
425 false, // Don't create a window if one already exists. 425 false, // Don't create a window if one already exists.
426 true, // Create a first run window. 426 true, // Create a first run window.
427 profile, 427 profile,
428 status); 428 status);
429 } 429 }
430 430
431 void SigninCreateProfileHandler::OpenSigninDialogForProfile(Profile* profile) { 431 void SigninCreateProfileHandler::OpenSigninDialogForProfile(Profile* profile) {
432 UserManager::ShowSigninDialog(web_ui()->GetWebContents()->GetBrowserContext(), 432 UserManagerProfileDialog::ShowSigninDialog(
433 profile->GetPath()); 433 web_ui()->GetWebContents()->GetBrowserContext(), profile->GetPath());
434 } 434 }
435 435
436 void SigninCreateProfileHandler::ShowProfileCreationError( 436 void SigninCreateProfileHandler::ShowProfileCreationError(
437 Profile* profile, 437 Profile* profile,
438 const base::string16& error) { 438 const base::string16& error) {
439 DCHECK_NE(NO_CREATION_IN_PROGRESS, profile_creation_type_); 439 DCHECK_NE(NO_CREATION_IN_PROGRESS, profile_creation_type_);
440 web_ui()->CallJavascriptFunctionUnsafe( 440 web_ui()->CallJavascriptFunctionUnsafe(
441 "cr.webUIListenerCallback", GetWebUIListenerName(PROFILE_CREATION_ERROR), 441 "cr.webUIListenerCallback", GetWebUIListenerName(PROFILE_CREATION_ERROR),
442 base::StringValue(error)); 442 base::StringValue(error));
443 // The ProfileManager calls us back with a NULL profile in some cases. 443 // The ProfileManager calls us back with a NULL profile in some cases.
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 808
809 profiles::OpenBrowserWindowForProfile( 809 profiles::OpenBrowserWindowForProfile(
810 base::Bind(&SigninCreateProfileHandler::OnBrowserReadyCallback, 810 base::Bind(&SigninCreateProfileHandler::OnBrowserReadyCallback,
811 weak_ptr_factory_.GetWeakPtr()), 811 weak_ptr_factory_.GetWeakPtr()),
812 false, // Don't create a window if one already exists. 812 false, // Don't create a window if one already exists.
813 true, // Create a first run window. 813 true, // Create a first run window.
814 profile, 814 profile,
815 Profile::CREATE_STATUS_INITIALIZED); 815 Profile::CREATE_STATUS_INITIALIZED);
816 } 816 }
817 #endif 817 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/login_ui_service.cc ('k') | chrome/browser/ui/webui/signin/signin_error_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698