| OLD | NEW |
| 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/sync/one_click_signin_helper.h" | 5 #include "chrome/browser/ui/sync/one_click_signin_helper.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 one_click_signin::HISTOGRAM_MAX); | 747 one_click_signin::HISTOGRAM_MAX); |
| 748 break; | 748 break; |
| 749 case signin::SOURCE_DEVICES_PAGE: | 749 case signin::SOURCE_DEVICES_PAGE: |
| 750 UMA_HISTOGRAM_ENUMERATION("Signin.DevicesPageActions", action, | 750 UMA_HISTOGRAM_ENUMERATION("Signin.DevicesPageActions", action, |
| 751 one_click_signin::HISTOGRAM_MAX); | 751 one_click_signin::HISTOGRAM_MAX); |
| 752 break; | 752 break; |
| 753 default: | 753 default: |
| 754 // This switch statement needs to be updated when the enum Source changes. | 754 // This switch statement needs to be updated when the enum Source changes. |
| 755 COMPILE_ASSERT(signin::SOURCE_UNKNOWN == 12, | 755 COMPILE_ASSERT(signin::SOURCE_UNKNOWN == 12, |
| 756 kSourceEnumHasChangedButNotThisSwitchStatement); | 756 kSourceEnumHasChangedButNotThisSwitchStatement); |
| 757 NOTREACHED(); | 757 UMA_HISTOGRAM_ENUMERATION("Signin.UnknownActions", action, |
| 758 return; | 758 one_click_signin::HISTOGRAM_MAX); |
| 759 } | 759 } |
| 760 UMA_HISTOGRAM_ENUMERATION("Signin.AllAccessPointActions", action, | 760 UMA_HISTOGRAM_ENUMERATION("Signin.AllAccessPointActions", action, |
| 761 one_click_signin::HISTOGRAM_MAX); | 761 one_click_signin::HISTOGRAM_MAX); |
| 762 } | 762 } |
| 763 | 763 |
| 764 // static | 764 // static |
| 765 void OneClickSigninHelper::CreateForWebContentsWithPasswordManager( | 765 void OneClickSigninHelper::CreateForWebContentsWithPasswordManager( |
| 766 content::WebContents* contents, | 766 content::WebContents* contents, |
| 767 password_manager::PasswordManager* password_manager) { | 767 password_manager::PasswordManager* password_manager) { |
| 768 if (!FromWebContents(contents)) { | 768 if (!FromWebContents(contents)) { |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1598 // If the web contents is showing a blank page and not about to be closed, | 1598 // If the web contents is showing a blank page and not about to be closed, |
| 1599 // redirect to the NTP or apps page. | 1599 // redirect to the NTP or apps page. |
| 1600 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) && | 1600 if (signin::IsContinueUrlForWebBasedSigninFlow(current_url) && |
| 1601 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) { | 1601 !signin::IsAutoCloseEnabledInURL(original_continue_url_)) { |
| 1602 RedirectToNtpOrAppsPage( | 1602 RedirectToNtpOrAppsPage( |
| 1603 web_contents(), | 1603 web_contents(), |
| 1604 signin::GetSourceForPromoURL(original_continue_url_)); | 1604 signin::GetSourceForPromoURL(original_continue_url_)); |
| 1605 } | 1605 } |
| 1606 } | 1606 } |
| 1607 } | 1607 } |
| OLD | NEW |