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

Side by Side Diff: components/autofill/renderer/password_generation_manager.cc

Issue 13973004: Convert string16 -> base::string16 in components/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
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 "components/autofill/renderer/password_generation_manager.h" 5 #include "components/autofill/renderer/password_generation_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/autofill/common/autofill_messages.h" 8 #include "components/autofill/common/autofill_messages.h"
9 #include "components/autofill/common/password_generation_util.h" 9 #include "components/autofill/common/password_generation_util.h"
10 #include "content/public/renderer/password_form_conversion_utils.h" 10 #include "content/public/renderer/password_form_conversion_utils.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 IPC_END_MESSAGE_MAP() 208 IPC_END_MESSAGE_MAP()
209 return handled; 209 return handled;
210 } 210 }
211 211
212 void PasswordGenerationManager::OnFormNotBlacklisted( 212 void PasswordGenerationManager::OnFormNotBlacklisted(
213 const content::PasswordForm& form) { 213 const content::PasswordForm& form) {
214 not_blacklisted_password_form_origins_.push_back(form.origin); 214 not_blacklisted_password_form_origins_.push_back(form.origin);
215 MaybeShowIcon(); 215 MaybeShowIcon();
216 } 216 }
217 217
218 void PasswordGenerationManager::OnPasswordAccepted(const string16& password) { 218 void PasswordGenerationManager::OnPasswordAccepted(
219 const base::string16& password) {
219 for (std::vector<WebKit::WebInputElement>::iterator it = passwords_.begin(); 220 for (std::vector<WebKit::WebInputElement>::iterator it = passwords_.begin();
220 it != passwords_.end(); ++it) { 221 it != passwords_.end(); ++it) {
221 it->setValue(password); 222 it->setValue(password);
222 it->setAutofilled(true); 223 it->setAutofilled(true);
223 // Advance focus to the next input field. We assume password fields in 224 // Advance focus to the next input field. We assume password fields in
224 // an account creation form are always adjacent. 225 // an account creation form are always adjacent.
225 render_view_->GetWebView()->advanceFocus(false); 226 render_view_->GetWebView()->advanceFocus(false);
226 } 227 }
227 } 228 }
228 229
(...skipping 18 matching lines...) Expand all
247 passwords_[0].decorationElementFor(this).setAttribute("style", 248 passwords_[0].decorationElementFor(this).setAttribute("style",
248 "display:block"); 249 "display:block");
249 password_generation::LogPasswordGenerationEvent( 250 password_generation::LogPasswordGenerationEvent(
250 password_generation::ICON_SHOWN); 251 password_generation::ICON_SHOWN);
251 return; 252 return;
252 } 253 }
253 } 254 }
254 } 255 }
255 256
256 } // namespace autofill 257 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698