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

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: format 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(
71 displayer.browser(), signin_metrics::SOURCE_APP_LAUNCHER); 71 displayer.browser(),
72 signin_metrics::AccessPoint::ACCESS_POINT_EXTENSIONS);
72 #endif 73 #endif
73 } 74 }
74 75
75 void LoginUIService::DisplayLoginResult(Browser* browser, 76 void LoginUIService::DisplayLoginResult(Browser* browser,
76 const base::string16& message) { 77 const base::string16& message) {
77 #if defined(OS_CHROMEOS) 78 #if defined(OS_CHROMEOS)
78 // ChromeOS doesn't have the avatar bubble so it never calls this function. 79 // ChromeOS doesn't have the avatar bubble so it never calls this function.
79 NOTREACHED(); 80 NOTREACHED();
80 #endif 81 #endif
81 last_login_result_ = message; 82 last_login_result_ = message;
82 browser->window()->ShowAvatarBubbleFromAvatarButton( 83 browser->window()->ShowAvatarBubbleFromAvatarButton(
83 message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN : 84 message.empty() ? BrowserWindow::AVATAR_BUBBLE_MODE_CONFIRM_SIGNIN
84 BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR, 85 : BrowserWindow::AVATAR_BUBBLE_MODE_SHOW_ERROR,
85 signin::ManageAccountsParams()); 86 signin::ManageAccountsParams(),
87 signin_metrics::AccessPoint::ACCESS_POINT_EXTENSIONS);
86 } 88 }
87 89
88 const base::string16& LoginUIService::GetLastLoginResult() { 90 const base::string16& LoginUIService::GetLastLoginResult() {
89 return last_login_result_; 91 return last_login_result_;
90 } 92 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc ('k') | chrome/browser/ui/webui/signin/login_ui_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698