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/signin/user_manager_screen_handler.h" | 5 #include "chrome/browser/ui/webui/signin/user_manager_screen_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/value_conversions.h" | 10 #include "base/value_conversions.h" |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
379 | 379 |
380 g_browser_process->profile_manager()->ScheduleProfileForDeletion( | 380 g_browser_process->profile_manager()->ScheduleProfileForDeletion( |
381 profile_path, | 381 profile_path, |
382 base::Bind(&OpenNewWindowForProfile, desktop_type_)); | 382 base::Bind(&OpenNewWindowForProfile, desktop_type_)); |
383 ProfileMetrics::LogProfileDeleteUser( | 383 ProfileMetrics::LogProfileDeleteUser( |
384 ProfileMetrics::DELETE_PROFILE_USER_MANAGER); | 384 ProfileMetrics::DELETE_PROFILE_USER_MANAGER); |
385 } | 385 } |
386 | 386 |
387 void UserManagerScreenHandler::HandleLaunchGuest(const base::ListValue* args) { | 387 void UserManagerScreenHandler::HandleLaunchGuest(const base::ListValue* args) { |
388 if (IsGuestModeEnabled()) { | 388 if (IsGuestModeEnabled()) { |
389 ProfileMetrics::LogProfileSwitchUser(ProfileMetrics::SWITCH_PROFILE_GUEST); | |
Mike Lerman
2015/01/21 20:58:03
Why did you remove this? It's definitely interesti
anthonyvd
2015/01/21 21:12:18
We ended up logging it twice. Once here and once
| |
390 profiles::SwitchToGuestProfile( | 389 profiles::SwitchToGuestProfile( |
391 desktop_type_, | 390 desktop_type_, |
392 base::Bind(&UserManagerScreenHandler::OnSwitchToProfileComplete, | 391 base::Bind(&UserManagerScreenHandler::OnSwitchToProfileComplete, |
393 weak_ptr_factory_.GetWeakPtr())); | 392 weak_ptr_factory_.GetWeakPtr())); |
394 } else { | 393 } else { |
395 // The UI should have prevented the user from allowing the selection of | 394 // The UI should have prevented the user from allowing the selection of |
396 // guest mode. | 395 // guest mode. |
397 NOTREACHED(); | 396 NOTREACHED(); |
398 } | 397 } |
399 } | 398 } |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
758 Profile* profile, Profile::CreateStatus profile_create_status) { | 757 Profile* profile, Profile::CreateStatus profile_create_status) { |
759 Browser* browser = chrome::FindAnyBrowser(profile, false, desktop_type_); | 758 Browser* browser = chrome::FindAnyBrowser(profile, false, desktop_type_); |
760 if (browser && browser->window()) { | 759 if (browser && browser->window()) { |
761 OnBrowserWindowReady(browser); | 760 OnBrowserWindowReady(browser); |
762 } else { | 761 } else { |
763 registrar_.Add(this, | 762 registrar_.Add(this, |
764 chrome::NOTIFICATION_BROWSER_WINDOW_READY, | 763 chrome::NOTIFICATION_BROWSER_WINDOW_READY, |
765 content::NotificationService::AllSources()); | 764 content::NotificationService::AllSources()); |
766 } | 765 } |
767 } | 766 } |
OLD | NEW |