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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/login/existing_user_controller.h" 5 #include "chrome/browser/chromeos/login/existing_user_controller.h"
6 6
7 #include <memory>
7 #include <vector> 8 #include <vector>
8 9
9 #include "base/bind.h" 10 #include "base/bind.h"
10 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
11 #include "base/callback.h" 12 #include "base/callback.h"
12 #include "base/command_line.h" 13 #include "base/command_line.h"
13 #include "base/logging.h" 14 #include "base/logging.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "base/metrics/histogram_macros.h" 16 #include "base/metrics/histogram_macros.h"
17 #include "base/strings/string_util.h" 17 #include "base/strings/string_util.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "base/version.h" 20 #include "base/version.h"
21 #include "chrome/browser/browser_process.h" 21 #include "chrome/browser/browser_process.h"
22 #include "chrome/browser/browser_process_platform_part.h" 22 #include "chrome/browser/browser_process_platform_part.h"
23 #include "chrome/browser/chrome_notification_types.h" 23 #include "chrome/browser/chrome_notification_types.h"
24 #include "chrome/browser/chromeos/boot_times_recorder.h" 24 #include "chrome/browser/chromeos/boot_times_recorder.h"
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 } 1016 }
1017 1017
1018 void ExistingUserController::SendAccessibilityAlert( 1018 void ExistingUserController::SendAccessibilityAlert(
1019 const std::string& alert_text) { 1019 const std::string& alert_text) {
1020 AutomationManagerAura::GetInstance()->HandleAlert( 1020 AutomationManagerAura::GetInstance()->HandleAlert(
1021 ProfileHelper::GetSigninProfile(), alert_text); 1021 ProfileHelper::GetSigninProfile(), alert_text);
1022 } 1022 }
1023 1023
1024 void ExistingUserController::SetPublicSessionKeyboardLayoutAndLogin( 1024 void ExistingUserController::SetPublicSessionKeyboardLayoutAndLogin(
1025 const UserContext& user_context, 1025 const UserContext& user_context,
1026 scoped_ptr<base::ListValue> keyboard_layouts) { 1026 std::unique_ptr<base::ListValue> keyboard_layouts) {
1027 UserContext new_user_context = user_context; 1027 UserContext new_user_context = user_context;
1028 std::string keyboard_layout; 1028 std::string keyboard_layout;
1029 for (size_t i = 0; i < keyboard_layouts->GetSize(); ++i) { 1029 for (size_t i = 0; i < keyboard_layouts->GetSize(); ++i) {
1030 base::DictionaryValue* entry = nullptr; 1030 base::DictionaryValue* entry = nullptr;
1031 keyboard_layouts->GetDictionary(i, &entry); 1031 keyboard_layouts->GetDictionary(i, &entry);
1032 bool selected = false; 1032 bool selected = false;
1033 entry->GetBoolean("selected", &selected); 1033 entry->GetBoolean("selected", &selected);
1034 if (selected) { 1034 if (selected) {
1035 entry->GetString("value", &keyboard_layout); 1035 entry->GetString("value", &keyboard_layout);
1036 break; 1036 break;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 } 1262 }
1263 1263
1264 // Otherwise, show the unrecoverable cryptohome error UI and ask user's 1264 // Otherwise, show the unrecoverable cryptohome error UI and ask user's
1265 // permission to collect a feedback. 1265 // permission to collect a feedback.
1266 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_CRYPTOHOME_FAILURE); 1266 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_CRYPTOHOME_FAILURE);
1267 VLOG(1) << "Show unrecoverable cryptohome error dialog."; 1267 VLOG(1) << "Show unrecoverable cryptohome error dialog.";
1268 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); 1268 login_display_->ShowUnrecoverableCrypthomeErrorDialog();
1269 } 1269 }
1270 1270
1271 } // namespace chromeos 1271 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698