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

Unified Diff: chrome/browser/ui/webui/options/manage_profile_handler.cc

Issue 15774008: Pass errors generated during limited-user registration up to the UI for display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Addressed Drew's comments Created 7 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/options/manage_profile_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/manage_profile_handler.cc
===================================================================
--- chrome/browser/ui/webui/options/manage_profile_handler.cc (revision 203598)
+++ chrome/browser/ui/webui/options/manage_profile_handler.cc (working copy)
@@ -103,6 +103,7 @@
{ "createProfileInstructions", IDS_PROFILES_CREATE_INSTRUCTIONS },
{ "createProfileConfirm", IDS_PROFILES_CREATE_CONFIRM },
{ "createProfileLocalError", IDS_PROFILES_CREATE_LOCAL_ERROR },
+ { "createProfileRemoteError", IDS_PROFILES_CREATE_REMOTE_ERROR },
{ "createProfileShortcut", IDS_PROFILES_CREATE_SHORTCUT },
{ "removeProfileShortcut", IDS_PROFILES_REMOVE_SHORTCUT },
};
@@ -132,9 +133,6 @@
web_ui()->RegisterMessageCallback("setProfileNameAndIcon",
base::Bind(&ManageProfileHandler::SetProfileNameAndIcon,
base::Unretained(this)));
- web_ui()->RegisterMessageCallback("deleteProfile",
- base::Bind(&ManageProfileHandler::DeleteProfile,
- base::Unretained(this)));
web_ui()->RegisterMessageCallback("requestDefaultProfileIcons",
base::Bind(&ManageProfileHandler::RequestDefaultProfileIcons,
base::Unretained(this)));
@@ -315,37 +313,6 @@
ProfileMetrics::LogProfileUpdate(profile_file_path);
}
-void ManageProfileHandler::DeleteProfile(const ListValue* args) {
- DCHECK(args);
-#if defined(ENABLE_MANAGED_USERS)
- // This handler could have been called in managed mode, for example because
- // the user fiddled with the web inspector. Silently return in this case.
- ManagedUserService* service =
- ManagedUserServiceFactory::GetForProfile(Profile::FromWebUI(web_ui()));
- if (service->ProfileIsManaged())
- return;
-#endif
-
- if (!ProfileManager::IsMultipleProfilesEnabled())
- return;
-
- ProfileMetrics::LogProfileDeleteUser(ProfileMetrics::PROFILE_DELETED);
-
- base::FilePath profile_file_path;
- if (!GetProfilePathFromArgs(args, &profile_file_path))
- return;
-
- Browser* browser =
- chrome::FindBrowserWithWebContents(web_ui()->GetWebContents());
- chrome::HostDesktopType desktop_type = chrome::HOST_DESKTOP_TYPE_NATIVE;
- if (browser)
- desktop_type = browser->host_desktop_type();
-
- g_browser_process->profile_manager()->ScheduleProfileForDeletion(
- profile_file_path,
- base::Bind(&OnNewDefaultProfileCreated, desktop_type));
-}
-
#if defined(ENABLE_SETTINGS_APP)
void ManageProfileHandler::SwitchAppListProfile(const ListValue* args) {
DCHECK(args);
« no previous file with comments | « chrome/browser/ui/webui/options/manage_profile_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698