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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 months 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 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/password_manager/generated_password_saved_infobar_deleg ate_android.h" 5 #include "chrome/browser/password_manager/generated_password_saved_infobar_deleg ate_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/android/chrome_application.h" 10 #include "chrome/browser/android/chrome_application.h"
11 #include "chrome/browser/infobars/infobar_service.h" 11 #include "chrome/browser/infobars/infobar_service.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/sync/profile_sync_service_factory.h" 13 #include "chrome/browser/sync/profile_sync_service_factory.h"
14 #include "chrome/grit/generated_resources.h" 14 #include "chrome/grit/generated_resources.h"
15 #include "chrome/grit/theme_resources.h" 15 #include "chrome/grit/theme_resources.h"
16 #include "components/browser_sync/browser/profile_sync_service.h" 16 #include "components/browser_sync/browser/profile_sync_service.h"
17 #include "components/password_manager/core/browser/password_bubble_experiment.h" 17 #include "components/password_manager/core/browser/password_bubble_experiment.h"
18 #include "components/password_manager/core/browser/password_manager_constants.h" 18 #include "components/password_manager/core/browser/password_manager_constants.h"
19 #include "components/strings/grit/components_strings.h" 19 #include "components/strings/grit/components_strings.h"
20 #include "content/public/browser/web_contents.h" 20 #include "content/public/browser/web_contents.h"
21 #include "ui/base/l10n/l10n_util.h" 21 #include "ui/base/l10n/l10n_util.h"
22 22
23 GeneratedPasswordSavedInfoBarDelegateAndroid:: 23 GeneratedPasswordSavedInfoBarDelegateAndroid::
24 ~GeneratedPasswordSavedInfoBarDelegateAndroid() {} 24 ~GeneratedPasswordSavedInfoBarDelegateAndroid() {}
25 25
26 void GeneratedPasswordSavedInfoBarDelegateAndroid::OnInlineLinkClicked() { 26 void GeneratedPasswordSavedInfoBarDelegateAndroid::OnInlineLinkClicked() {
27 if (smart_lock_branding_enabled_) { 27 if (smart_lock_branding_enabled_) {
28 InfoBarService::WebContentsFromInfoBar(infobar()) 28 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL(
29 ->OpenURL(content::OpenURLParams( 29 content::OpenURLParams(
30 GURL(password_manager::kPasswordManagerAccountDashboardURL), 30 GURL(password_manager::kPasswordManagerAccountDashboardURL),
31 content::Referrer(), NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, 31 content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB,
32 false)); 32 ui::PAGE_TRANSITION_LINK, false));
33 } else { 33 } else {
34 chrome::android::ChromeApplication::ShowPasswordSettings(); 34 chrome::android::ChromeApplication::ShowPasswordSettings();
35 } 35 }
36 } 36 }
37 37
38 GeneratedPasswordSavedInfoBarDelegateAndroid:: 38 GeneratedPasswordSavedInfoBarDelegateAndroid::
39 GeneratedPasswordSavedInfoBarDelegateAndroid( 39 GeneratedPasswordSavedInfoBarDelegateAndroid(
40 content::WebContents *web_contents) 40 content::WebContents *web_contents)
41 : button_label_(l10n_util::GetStringUTF16(IDS_OK)), 41 : button_label_(l10n_util::GetStringUTF16(IDS_OK)),
42 web_contents_(web_contents), 42 web_contents_(web_contents),
(...skipping 24 matching lines...) Expand all
67 } 67 }
68 68
69 infobars::InfoBarDelegate::InfoBarIdentifier 69 infobars::InfoBarDelegate::InfoBarIdentifier
70 GeneratedPasswordSavedInfoBarDelegateAndroid::GetIdentifier() const { 70 GeneratedPasswordSavedInfoBarDelegateAndroid::GetIdentifier() const {
71 return GENERATED_PASSWORD_SAVED_INFOBAR_DELEGATE_ANDROID; 71 return GENERATED_PASSWORD_SAVED_INFOBAR_DELEGATE_ANDROID;
72 } 72 }
73 73
74 int GeneratedPasswordSavedInfoBarDelegateAndroid::GetIconId() const { 74 int GeneratedPasswordSavedInfoBarDelegateAndroid::GetIconId() const {
75 return IDR_INFOBAR_SAVE_PASSWORD; 75 return IDR_INFOBAR_SAVE_PASSWORD;
76 } 76 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698