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

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

Issue 106053008: [Mac] Passwords: Don't always prompt to access passwords saved by other browsers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix yet another compile failure. Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test_password_store.h" 5 #include "chrome/browser/password_manager/test_password_store.h"
6 6
7 #include "components/autofill/core/common/password_form.h" 7 #include "components/autofill/core/common/password_form.h"
8 8
9 // static 9 // static
10 scoped_refptr<RefcountedBrowserContextKeyedService> TestPasswordStore::Create( 10 scoped_refptr<RefcountedBrowserContextKeyedService> TestPasswordStore::Create(
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 it != forms.end(); ++it) { 63 it != forms.end(); ++it) {
64 if (FormsAreEquivalent(form, *it)) { 64 if (FormsAreEquivalent(form, *it)) {
65 forms.erase(it); 65 forms.erase(it);
66 return; 66 return;
67 } 67 }
68 } 68 }
69 } 69 }
70 70
71 void TestPasswordStore::GetLoginsImpl( 71 void TestPasswordStore::GetLoginsImpl(
72 const autofill::PasswordForm& form, 72 const autofill::PasswordForm& form,
73 PasswordStore::AuthorizationPromptPolicy prompt_policy,
73 const PasswordStore::ConsumerCallbackRunner& runner) { 74 const PasswordStore::ConsumerCallbackRunner& runner) {
74 std::vector<autofill::PasswordForm*> matched_forms; 75 std::vector<autofill::PasswordForm*> matched_forms;
75 std::vector<autofill::PasswordForm> forms = 76 std::vector<autofill::PasswordForm> forms =
76 stored_passwords_[form.signon_realm]; 77 stored_passwords_[form.signon_realm];
77 for (std::vector<autofill::PasswordForm>::iterator it = forms.begin(); 78 for (std::vector<autofill::PasswordForm>::iterator it = forms.begin();
78 it != forms.end(); ++it) { 79 it != forms.end(); ++it) {
79 matched_forms.push_back(new autofill::PasswordForm(*it)); 80 matched_forms.push_back(new autofill::PasswordForm(*it));
80 } 81 }
81 runner.Run(matched_forms); 82 runner.Run(matched_forms);
82 } 83 }
83 84
84 bool TestPasswordStore::FillAutofillableLogins( 85 bool TestPasswordStore::FillAutofillableLogins(
85 std::vector<autofill::PasswordForm*>* forms) { 86 std::vector<autofill::PasswordForm*>* forms) {
86 return true; 87 return true;
87 } 88 }
88 89
89 bool TestPasswordStore::FillBlacklistLogins( 90 bool TestPasswordStore::FillBlacklistLogins(
90 std::vector<autofill::PasswordForm*>* forms) { 91 std::vector<autofill::PasswordForm*>* forms) {
91 return true; 92 return true;
92 } 93 }
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/test_password_store.h ('k') | chrome/browser/sync/test/integration/passwords_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698