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

Side by Side Diff: chrome/browser/password_manager/auto_signin_first_run_infobar_delegate.cc

Issue 1520543004: Add method for identifying different InfoBars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing 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 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
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 std::string AutoSigninFirstRunInfoBarDelegate::GetIdentifier() const {
55 return "AutoSigninFirstRunInfoBarDelegate";
56 }
57
54 base::string16 AutoSigninFirstRunInfoBarDelegate::GetButtonLabel( 58 base::string16 AutoSigninFirstRunInfoBarDelegate::GetButtonLabel(
55 InfoBarButton button) const { 59 InfoBarButton button) const {
56 return l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_OK_BUTTON); 60 return l10n_util::GetStringUTF16(IDS_ONE_CLICK_SIGNIN_DIALOG_OK_BUTTON);
57 } 61 }
58 62
59 bool AutoSigninFirstRunInfoBarDelegate::Accept() { 63 bool AutoSigninFirstRunInfoBarDelegate::Accept() {
60 return true; 64 return true;
61 } 65 }
62 66
63 bool AutoSigninFirstRunInfoBarDelegate::Cancel() { 67 bool AutoSigninFirstRunInfoBarDelegate::Cancel() {
64 return true; 68 return true;
65 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698