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

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

Issue 2132063002: Implement origin-based deletion for password manager's auto-signin bit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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/native_backend_gnome_x.h" 5 #include "chrome/browser/password_manager/native_backend_gnome_x.h"
6 6
7 #include <dlfcn.h> 7 #include <dlfcn.h>
8 #include <gnome-keyring.h> 8 #include <gnome-keyring.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 delete_begin, delete_end, CREATION_TIMESTAMP, changes); 692 delete_begin, delete_end, CREATION_TIMESTAMP, changes);
693 } 693 }
694 694
695 bool NativeBackendGnome::RemoveLoginsSyncedBetween( 695 bool NativeBackendGnome::RemoveLoginsSyncedBetween(
696 base::Time delete_begin, 696 base::Time delete_begin,
697 base::Time delete_end, 697 base::Time delete_end,
698 password_manager::PasswordStoreChangeList* changes) { 698 password_manager::PasswordStoreChangeList* changes) {
699 return RemoveLoginsBetween(delete_begin, delete_end, SYNC_TIMESTAMP, changes); 699 return RemoveLoginsBetween(delete_begin, delete_end, SYNC_TIMESTAMP, changes);
700 } 700 }
701 701
702 bool NativeBackendGnome::DisableAutoSignInForAllLogins( 702 bool NativeBackendGnome::DisableAutoSignInForOrigins(
703 const base::Callback<bool(const GURL&)>& origin_filter,
703 password_manager::PasswordStoreChangeList* changes) { 704 password_manager::PasswordStoreChangeList* changes) {
704 ScopedVector<PasswordForm> forms; 705 ScopedVector<PasswordForm> forms;
705 if (!GetAllLogins(&forms)) 706 if (!GetAllLogins(&forms))
706 return false; 707 return false;
707 708
708 for (auto& form : forms) { 709 for (auto& form : forms) {
709 if (!form->skip_zero_click) { 710 if (origin_filter.Run(form->origin) && !form->skip_zero_click) {
vabr (Chromium) 2016/07/08 19:22:03 Recalling your earlier planned to accept a "null"
msramek 2016/07/11 13:09:17 Correct - I would leave that for another pass when
710 form->skip_zero_click = true; 711 form->skip_zero_click = true;
711 if (!UpdateLogin(*form, changes)) 712 if (!UpdateLogin(*form, changes))
712 return false; 713 return false;
713 } 714 }
714 } 715 }
715 716
716 return true; 717 return true;
717 } 718 }
718 719
719 bool NativeBackendGnome::GetLogins(const PasswordForm& form, 720 bool NativeBackendGnome::GetLogins(const PasswordForm& form,
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 ScopedVector<PasswordForm> forms; 840 ScopedVector<PasswordForm> forms;
840 if (!GetLoginsBetween(get_begin, get_end, date_to_compare, &forms)) 841 if (!GetLoginsBetween(get_begin, get_end, date_to_compare, &forms))
841 return false; 842 return false;
842 843
843 for (size_t i = 0; i < forms.size(); ++i) { 844 for (size_t i = 0; i < forms.size(); ++i) {
844 if (!RemoveLogin(*forms[i], changes)) 845 if (!RemoveLogin(*forms[i], changes))
845 return false; 846 return false;
846 } 847 }
847 return true; 848 return true;
848 } 849 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698