OLD | NEW |
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/cocoa/profiles/user_manager_mac.h" | 5 #include "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" |
6 | 6 |
7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #import "chrome/browser/app_controller_mac.h" | 9 #import "chrome/browser/app_controller_mac.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 auto closeButton = [window standardWindowButton:NSWindowCloseButton]; | 212 auto closeButton = [window standardWindowButton:NSWindowCloseButton]; |
213 [closeButton setTarget:self]; | 213 [closeButton setTarget:self]; |
214 [closeButton setAction:@selector(closeButtonClicked:)]; | 214 [closeButton setAction:@selector(closeButtonClicked:)]; |
215 [self show]; | 215 [self show]; |
216 } | 216 } |
217 | 217 |
218 return self; | 218 return self; |
219 } | 219 } |
220 | 220 |
221 - (void)show { | 221 - (void)show { |
222 GURL url = signin::GetReauthURLWithEmail(emailAddress_); | 222 GURL url = signin::GetReauthURLWithEmail( |
| 223 signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER, |
| 224 signin_metrics::Reason::REASON_UNLOCK, emailAddress_); |
223 reauthWebContents_->GetController().LoadURL(url, content::Referrer(), | 225 reauthWebContents_->GetController().LoadURL(url, content::Referrer(), |
224 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, | 226 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
225 std::string()); | 227 std::string()); |
226 } | 228 } |
227 | 229 |
228 - (void)closeButtonClicked:(NSButton*)button { | 230 - (void)closeButtonClicked:(NSButton*)button { |
229 [self close]; | 231 [self close]; |
230 } | 232 } |
231 | 233 |
232 - (void)close { | 234 - (void)close { |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 ProfileMetrics::LogTimeToOpenUserManager( | 474 ProfileMetrics::LogTimeToOpenUserManager( |
473 base::Time::Now() - user_manager_started_showing_); | 475 base::Time::Now() - user_manager_started_showing_); |
474 user_manager_started_showing_ = base::Time(); | 476 user_manager_started_showing_ = base::Time(); |
475 } | 477 } |
476 | 478 |
477 void UserManagerMac::WindowWasClosed() { | 479 void UserManagerMac::WindowWasClosed() { |
478 CloseReauthDialog(); | 480 CloseReauthDialog(); |
479 instance_ = NULL; | 481 instance_ = NULL; |
480 delete this; | 482 delete this; |
481 } | 483 } |
OLD | NEW |