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

Side by Side Diff: chrome/browser/ui/webui/signin/login_ui_service.cc

Issue 1473543002: Implement newly designed sign-in related histograms for desktop platorms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/ui/webui/signin/login_ui_service.h" 5 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/signin/signin_promo.h" 8 #include "chrome/browser/signin/signin_promo.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 FOR_EACH_OBSERVER(Observer, observer_list_, OnUntrustedLoginUIShown()); 60 FOR_EACH_OBSERVER(Observer, observer_list_, OnUntrustedLoginUIShown());
61 } 61 }
62 62
63 void LoginUIService::ShowLoginPopup() { 63 void LoginUIService::ShowLoginPopup() {
64 #if defined(OS_CHROMEOS) 64 #if defined(OS_CHROMEOS)
65 if (chrome::IsRunningInForcedAppMode()) 65 if (chrome::IsRunningInForcedAppMode())
66 InlineLoginDialog::Show(profile_); 66 InlineLoginDialog::Show(profile_);
67 #else 67 #else
68 chrome::ScopedTabbedBrowserDisplayer displayer( 68 chrome::ScopedTabbedBrowserDisplayer displayer(
69 profile_, chrome::GetActiveDesktop()); 69 profile_, chrome::GetActiveDesktop());
70 chrome::ShowBrowserSignin( 70 chrome::ShowBrowserSignin(displayer.browser(),
71 displayer.browser(), signin_metrics::SOURCE_APP_LAUNCHER); 71 signin_metrics::ACCESS_POINT_EXTENSIONS);
72 #endif 72 #endif
73 } 73 }
74 74
75 void LoginUIService::DisplayLoginResult(Browser* browser, 75 void LoginUIService::DisplayLoginResult(Browser* browser,
76 const base::string16& message) { 76 const base::string16& message) {
77 #if defined(OS_CHROMEOS) 77 #if defined(OS_CHROMEOS)
78 // ChromeOS doesn't have the avatar bubble so it never calls this function. 78 // ChromeOS doesn't have the avatar bubble so it never calls this function.
79 NOTREACHED(); 79 NOTREACHED();
80 #endif 80 #endif
81 last_login_result_ = message; 81 last_login_result_ = message;
82 browser->window()->ShowAvatarBubbleFromAvatarButton( 82 browser->window()->ShowAvatarBubbleFromAvatarButton(
83 message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN : 83 message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN
84 BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR, 84 : BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR,
85 signin::ManageAccountsParams()); 85 signin::ManageAccountsParams(), signin_metrics::ACCESS_POINT_EXTENSIONS);
86 } 86 }
87 87
88 const base::string16& LoginUIService::GetLastLoginResult() { 88 const base::string16& LoginUIService::GetLastLoginResult() {
89 return last_login_result_; 89 return last_login_result_;
90 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698