OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/password_manager/auto_signin_first_run_infobar_delegate
.h" | 5 #include "chrome/browser/password_manager/auto_signin_first_run_infobar_delegate
.h" |
6 | 6 |
7 #include "chrome/browser/infobars/infobar_service.h" | 7 #include "chrome/browser/infobars/infobar_service.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/sync/profile_sync_service_factory.h" | 9 #include "chrome/browser/sync/profile_sync_service_factory.h" |
10 #include "chrome/browser/ui/android/infobars/auto_signin_first_run_infobar.h" | 10 #include "chrome/browser/ui/android/infobars/auto_signin_first_run_infobar.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 SetMessage(message); | 44 SetMessage(message); |
45 } | 45 } |
46 | 46 |
47 AutoSigninFirstRunInfoBarDelegate::~AutoSigninFirstRunInfoBarDelegate() { | 47 AutoSigninFirstRunInfoBarDelegate::~AutoSigninFirstRunInfoBarDelegate() { |
48 Profile* profile = | 48 Profile* profile = |
49 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); | 49 Profile::FromBrowserContext(web_contents_->GetBrowserContext()); |
50 password_bubble_experiment::RecordAutoSignInPromptFirstRunExperienceWasShown( | 50 password_bubble_experiment::RecordAutoSignInPromptFirstRunExperienceWasShown( |
51 profile->GetPrefs()); | 51 profile->GetPrefs()); |
52 } | 52 } |
53 | 53 |
| 54 infobars::InfoBarDelegate::InfoBarIdentifier |
| 55 AutoSigninFirstRunInfoBarDelegate::GetIdentifier() const { |
| 56 return AUTO_SIGNIN_FIRST_RUN_INFOBAR_DELEGATE; |
| 57 } |
| 58 |
54 base::string16 AutoSigninFirstRunInfoBarDelegate::GetButtonLabel( | 59 base::string16 AutoSigninFirstRunInfoBarDelegate::GetButtonLabel( |
55 InfoBarButton button) const { | 60 InfoBarButton button) const { |
56 return l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_OK_BUTTON); | 61 return l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_OK_BUTTON); |
57 } | 62 } |
58 | 63 |
59 bool AutoSigninFirstRunInfoBarDelegate::Accept() { | 64 bool AutoSigninFirstRunInfoBarDelegate::Accept() { |
60 return true; | 65 return true; |
61 } | 66 } |
62 | 67 |
63 bool AutoSigninFirstRunInfoBarDelegate::Cancel() { | 68 bool AutoSigninFirstRunInfoBarDelegate::Cancel() { |
64 return true; | 69 return true; |
65 } | 70 } |
OLD | NEW |