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

Side by Side Diff: chrome/browser/ui/webui/options/supervised_user_import_handler.cc

Issue 2812953002: Stop passing raw pointers to base::Value API in c/b/ui (Closed)
Patch Set: Rebased Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/supervised_user_import_handler.h" 5 #include "chrome/browser/ui/webui/options/supervised_user_import_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 IDS_LEGACY_SUPERVISED_USER_NO_EXISTING_ERROR }, 89 IDS_LEGACY_SUPERVISED_USER_NO_EXISTING_ERROR },
90 { "supervisedUserSelectAvatarTitle", 90 { "supervisedUserSelectAvatarTitle",
91 IDS_LEGACY_SUPERVISED_USER_SELECT_AVATAR_TITLE }, 91 IDS_LEGACY_SUPERVISED_USER_SELECT_AVATAR_TITLE },
92 { "supervisedUserSelectAvatarText", 92 { "supervisedUserSelectAvatarText",
93 IDS_LEGACY_SUPERVISED_USER_SELECT_AVATAR_TEXT }, 93 IDS_LEGACY_SUPERVISED_USER_SELECT_AVATAR_TEXT },
94 { "supervisedUserSelectAvatarOk", 94 { "supervisedUserSelectAvatarOk",
95 IDS_LEGACY_SUPERVISED_USER_SELECT_AVATAR_OK }, 95 IDS_LEGACY_SUPERVISED_USER_SELECT_AVATAR_OK },
96 }; 96 };
97 97
98 RegisterStrings(localized_strings, resources, arraysize(resources)); 98 RegisterStrings(localized_strings, resources, arraysize(resources));
99 localized_strings->Set("avatarIcons", GetAvatarIcons().release()); 99 localized_strings->Set("avatarIcons", GetAvatarIcons());
100 } 100 }
101 101
102 void SupervisedUserImportHandler::InitializeHandler() { 102 void SupervisedUserImportHandler::InitializeHandler() {
103 Profile* profile = Profile::FromWebUI(web_ui()); 103 Profile* profile = Profile::FromWebUI(web_ui());
104 if (!profile->IsSupervised()) { 104 if (!profile->IsSupervised()) {
105 profile_observer_.Add( 105 profile_observer_.Add(
106 &g_browser_process->profile_manager()->GetProfileAttributesStorage()); 106 &g_browser_process->profile_manager()->GetProfileAttributesStorage());
107 SupervisedUserSyncService* sync_service = 107 SupervisedUserSyncService* sync_service =
108 SupervisedUserSyncServiceFactory::GetForProfile(profile); 108 SupervisedUserSyncServiceFactory::GetForProfile(profile);
109 if (sync_service) { 109 if (sync_service) {
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 const std::string& key) { 295 const std::string& key) {
296 if (key == supervised_users::kChromeAvatarIndex) 296 if (key == supervised_users::kChromeAvatarIndex)
297 FetchSupervisedUsers(); 297 FetchSupervisedUsers();
298 } 298 }
299 299
300 void SupervisedUserImportHandler::OnErrorChanged() { 300 void SupervisedUserImportHandler::OnErrorChanged() {
301 FetchSupervisedUsers(); 301 FetchSupervisedUsers();
302 } 302 }
303 303
304 } // namespace options 304 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698