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

Side by Side Diff: components/password_manager/core/browser/password_generation_manager.cc

Issue 707173004: Refactor Autofill for out of process iframes (OOPIF). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 "components/password_manager/core/browser/password_generation_manager.h " 5 #include "components/password_manager/core/browser/password_generation_manager.h "
6 6
7 #include "components/autofill/core/browser/autofill_field.h" 7 #include "components/autofill/core/browser/autofill_field.h"
8 #include "components/autofill/core/browser/field_types.h" 8 #include "components/autofill/core/browser/field_types.h"
9 #include "components/autofill/core/browser/form_structure.h" 9 #include "components/autofill/core/browser/form_structure.h"
10 #include "components/autofill/core/common/form_data.h" 10 #include "components/autofill/core/common/form_data.h"
11 #include "components/password_manager/core/browser/password_manager.h" 11 #include "components/password_manager/core/browser/password_manager.h"
12 #include "components/password_manager/core/browser/password_manager_client.h" 12 #include "components/password_manager/core/browser/password_manager_client.h"
13 #include "components/password_manager/core/browser/password_manager_driver.h" 13 #include "components/password_manager/core/browser/password_manager_driver.h"
14 14
15 namespace password_manager { 15 namespace password_manager {
16 16
17 PasswordGenerationManager::PasswordGenerationManager( 17 PasswordGenerationManager::PasswordGenerationManager(
18 PasswordManagerClient* client) 18 PasswordManagerClient* client,
19 : client_(client), 19 PasswordManagerDriver* driver)
20 driver_(client->GetDriver()) {} 20 : client_(client), driver_(driver) {
21 }
21 22
22 PasswordGenerationManager::~PasswordGenerationManager() {} 23 PasswordGenerationManager::~PasswordGenerationManager() {}
23 24
24 void PasswordGenerationManager::DetectAccountCreationForms( 25 void PasswordGenerationManager::DetectAccountCreationForms(
25 const std::vector<autofill::FormStructure*>& forms) { 26 const std::vector<autofill::FormStructure*>& forms) {
26 std::vector<autofill::FormData> account_creation_forms; 27 std::vector<autofill::FormData> account_creation_forms;
27 for (std::vector<autofill::FormStructure*>::const_iterator form_it = 28 for (std::vector<autofill::FormStructure*>::const_iterator form_it =
28 forms.begin(); form_it != forms.end(); ++form_it) { 29 forms.begin(); form_it != forms.end(); ++form_it) {
29 autofill::FormStructure* form = *form_it; 30 autofill::FormStructure* form = *form_it;
30 for (std::vector<autofill::AutofillField*>::const_iterator field_it = 31 for (std::vector<autofill::AutofillField*>::const_iterator field_it =
(...skipping 23 matching lines...) Expand all
54 if (!client_->IsPasswordSyncEnabled(WITHOUT_CUSTOM_PASSPHRASE)) { 55 if (!client_->IsPasswordSyncEnabled(WITHOUT_CUSTOM_PASSPHRASE)) {
55 DVLOG(2) << "Generation disabled because passwords are not being synced or" 56 DVLOG(2) << "Generation disabled because passwords are not being synced or"
56 << " custom passphrase is used."; 57 << " custom passphrase is used.";
57 return false; 58 return false;
58 } 59 }
59 60
60 return true; 61 return true;
61 } 62 }
62 63
63 } // namespace password_manager 64 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698