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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_view_utils.cc

Issue 1379153003: [Smart Lock, UI] First run expience for Auto sign-in prompt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: AutoSigninFirstRunInfoBar.java Created 5 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_view_utils.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/passwords/manage_passwords_view_utils.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/grit/chromium_strings.h" 8 #include "chrome/grit/chromium_strings.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "components/password_manager/core/browser/affiliation_utils.h" 10 #include "components/password_manager/core/browser/affiliation_utils.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK); 112 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK);
113 *title = l10n_util::GetStringFUTF16( 113 *title = l10n_util::GetStringFUTF16(
114 IDS_PASSWORD_MANAGER_ACCOUNT_CHOOSER_TITLE_SMART_LOCK, title_link, 114 IDS_PASSWORD_MANAGER_ACCOUNT_CHOOSER_TITLE_SMART_LOCK, title_link,
115 &offset); 115 &offset);
116 *title_link_range = gfx::Range(offset, offset + title_link.length()); 116 *title_link_range = gfx::Range(offset, offset + title_link.length());
117 } else { 117 } else {
118 *title = 118 *title =
119 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_ACCOUNT_CHOOSER_TITLE); 119 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_ACCOUNT_CHOOSER_TITLE);
120 } 120 }
121 } 121 }
122
123 void GetAutoSigninPromptFirstRunExperienceExplanation(
124 bool is_smartlock_branding_enabled,
125 base::string16* explanation,
126 gfx::Range* explanation_link_range) {
127 *explanation_link_range = gfx::Range();
128 if (is_smartlock_branding_enabled) {
129 size_t offset;
130 base::string16 explanation_link =
131 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK);
132 *explanation = l10n_util::GetStringFUTF16(
133 IDS_MANAGE_PASSWORDS_AUTO_SIGNIN_SMART_LOCK_WELCOME, explanation_link,
134 &offset);
135 *explanation_link_range =
136 gfx::Range(offset, offset + explanation_link.length());
137 } else {
138 *explanation = l10n_util::GetStringFUTF16(
139 IDS_MANAGE_PASSWORDS_AUTO_SIGNIN_DEFAULT_WELCOME,
140 l10n_util::GetStringUTF16(IDS_SAVE_PASSWORD_TITLE_BRAND));
141 }
142 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_view_utils.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698