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

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

Issue 19775014: [Passwords, Mac] Don't always prompt to access passwords saved by other browsers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 "chrome/browser/password_manager/password_store_default.h" 5 #include "chrome/browser/password_manager/password_store_default.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 chrome::NOTIFICATION_LOGINS_CHANGED, 88 chrome::NOTIFICATION_LOGINS_CHANGED,
89 content::Source<PasswordStore>(this), 89 content::Source<PasswordStore>(this),
90 content::Details<PasswordStoreChangeList>(&changes)); 90 content::Details<PasswordStoreChangeList>(&changes));
91 } 91 }
92 } 92 }
93 STLDeleteElements(&forms); 93 STLDeleteElements(&forms);
94 } 94 }
95 95
96 void PasswordStoreDefault::GetLoginsImpl( 96 void PasswordStoreDefault::GetLoginsImpl(
97 const content::PasswordForm& form, 97 const content::PasswordForm& form,
98 const ConsumerCallbackRunner& callback_runner) { 98 const ConsumerCallbackRunner& callback_runner,
99 AuthorizationPromptPermission permission_to_prompt) {
99 std::vector<PasswordForm*> matched_forms; 100 std::vector<PasswordForm*> matched_forms;
100 login_db_->GetLogins(form, &matched_forms); 101 login_db_->GetLogins(form, &matched_forms);
101 callback_runner.Run(matched_forms); 102 callback_runner.Run(matched_forms);
102 } 103 }
103 104
104 void PasswordStoreDefault::GetAutofillableLoginsImpl( 105 void PasswordStoreDefault::GetAutofillableLoginsImpl(
105 GetLoginsRequest* request) { 106 GetLoginsRequest* request) {
106 FillAutofillableLogins(&request->value); 107 FillAutofillableLogins(&request->value);
107 ForwardLoginsResult(request); 108 ForwardLoginsResult(request);
108 } 109 }
109 110
110 void PasswordStoreDefault::GetBlacklistLoginsImpl( 111 void PasswordStoreDefault::GetBlacklistLoginsImpl(
111 GetLoginsRequest* request) { 112 GetLoginsRequest* request) {
112 FillBlacklistLogins(&request->value); 113 FillBlacklistLogins(&request->value);
113 ForwardLoginsResult(request); 114 ForwardLoginsResult(request);
114 } 115 }
115 116
116 bool PasswordStoreDefault::FillAutofillableLogins( 117 bool PasswordStoreDefault::FillAutofillableLogins(
117 std::vector<PasswordForm*>* forms) { 118 std::vector<PasswordForm*>* forms) {
118 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); 119 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
119 return login_db_->GetAutofillableLogins(forms); 120 return login_db_->GetAutofillableLogins(forms);
120 } 121 }
121 122
122 bool PasswordStoreDefault::FillBlacklistLogins( 123 bool PasswordStoreDefault::FillBlacklistLogins(
123 std::vector<PasswordForm*>* forms) { 124 std::vector<PasswordForm*>* forms) {
124 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); 125 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
125 return login_db_->GetBlacklistLogins(forms); 126 return login_db_->GetBlacklistLogins(forms);
126 } 127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698