OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/options/managed_user_import_handler.h" | 5 #include "chrome/browser/ui/webui/options/managed_user_import_handler.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 service->RemoveObserver(this); | 60 service->RemoveObserver(this); |
61 subscription_.reset(); | 61 subscription_.reset(); |
62 } | 62 } |
63 } | 63 } |
64 | 64 |
65 void ManagedUserImportHandler::GetLocalizedValues( | 65 void ManagedUserImportHandler::GetLocalizedValues( |
66 base::DictionaryValue* localized_strings) { | 66 base::DictionaryValue* localized_strings) { |
67 DCHECK(localized_strings); | 67 DCHECK(localized_strings); |
68 | 68 |
69 static OptionsStringResource resources[] = { | 69 static OptionsStringResource resources[] = { |
70 { "managedUserImportTitle", IDS_IMPORT_EXISTING_MANAGED_USER_TITLE }, | 70 { "managedUserImportTitle", IDS_IMPORT_EXISTING_SUPERVISED_USER_TITLE }, |
71 { "managedUserImportText", IDS_IMPORT_EXISTING_MANAGED_USER_TEXT }, | 71 { "managedUserImportText", IDS_IMPORT_EXISTING_SUPERVISED_USER_TEXT }, |
72 { "createNewUserLink", IDS_CREATE_NEW_USER_LINK }, | 72 { "createNewUserLink", IDS_CREATE_NEW_USER_LINK }, |
73 { "managedUserImportOk", IDS_IMPORT_EXISTING_MANAGED_USER_OK }, | 73 { "managedUserImportOk", IDS_IMPORT_EXISTING_SUPERVISED_USER_OK }, |
74 { "managedUserImportSigninError", IDS_MANAGED_USER_IMPORT_SIGN_IN_ERROR }, | 74 { "managedUserImportSigninError", |
| 75 IDS_SUPERVISED_USER_IMPORT_SIGN_IN_ERROR }, |
75 { "managedUserAlreadyOnThisDevice", | 76 { "managedUserAlreadyOnThisDevice", |
76 IDS_MANAGED_USER_ALREADY_ON_THIS_DEVICE }, | 77 IDS_SUPERVISED_USER_ALREADY_ON_THIS_DEVICE }, |
77 { "noExistingManagedUsers", IDS_MANAGED_USER_NO_EXISTING_ERROR }, | 78 { "noExistingManagedUsers", IDS_SUPERVISED_USER_NO_EXISTING_ERROR }, |
78 { "managedUserSelectAvatarTitle", IDS_MANAGED_USER_SELECT_AVATAR_TITLE }, | 79 { "managedUserSelectAvatarTitle", |
79 { "managedUserSelectAvatarText", IDS_MANAGED_USER_SELECT_AVATAR_TEXT }, | 80 IDS_SUPERVISED_USER_SELECT_AVATAR_TITLE }, |
80 { "managedUserSelectAvatarOk", IDS_MANAGED_USER_SELECT_AVATAR_OK }, | 81 { "managedUserSelectAvatarText", IDS_SUPERVISED_USER_SELECT_AVATAR_TEXT }, |
| 82 { "managedUserSelectAvatarOk", IDS_SUPERVISED_USER_SELECT_AVATAR_OK }, |
81 }; | 83 }; |
82 | 84 |
83 RegisterStrings(localized_strings, resources, arraysize(resources)); | 85 RegisterStrings(localized_strings, resources, arraysize(resources)); |
84 localized_strings->Set("avatarIcons", GetAvatarIcons().release()); | 86 localized_strings->Set("avatarIcons", GetAvatarIcons().release()); |
85 } | 87 } |
86 | 88 |
87 void ManagedUserImportHandler::InitializeHandler() { | 89 void ManagedUserImportHandler::InitializeHandler() { |
88 Profile* profile = Profile::FromWebUI(web_ui()); | 90 Profile* profile = Profile::FromWebUI(web_ui()); |
89 if (!profile->IsSupervised()) { | 91 if (!profile->IsSupervised()) { |
90 SupervisedUserSyncService* sync_service = | 92 SupervisedUserSyncService* sync_service = |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 const std::string& key) { | 242 const std::string& key) { |
241 if (key == supervised_users::kChromeAvatarIndex) | 243 if (key == supervised_users::kChromeAvatarIndex) |
242 FetchManagedUsers(); | 244 FetchManagedUsers(); |
243 } | 245 } |
244 | 246 |
245 void ManagedUserImportHandler::OnErrorChanged() { | 247 void ManagedUserImportHandler::OnErrorChanged() { |
246 FetchManagedUsers(); | 248 FetchManagedUsers(); |
247 } | 249 } |
248 | 250 |
249 } // namespace options | 251 } // namespace options |
OLD | NEW |