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

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

Issue 2169263002: chrome/browser/password_manager: Change auto to not deduce raw pointers. (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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_libsecret.h" 5 #include "chrome/browser/password_manager/native_backend_libsecret.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <libsecret/secret.h> 10 #include <libsecret/secret.h>
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 return RemoveLoginsBetween(delete_begin, delete_end, SYNC_TIMESTAMP, changes); 280 return RemoveLoginsBetween(delete_begin, delete_end, SYNC_TIMESTAMP, changes);
281 } 281 }
282 282
283 bool NativeBackendLibsecret::DisableAutoSignInForOrigins( 283 bool NativeBackendLibsecret::DisableAutoSignInForOrigins(
284 const base::Callback<bool(const GURL&)>& origin_filter, 284 const base::Callback<bool(const GURL&)>& origin_filter,
285 password_manager::PasswordStoreChangeList* changes) { 285 password_manager::PasswordStoreChangeList* changes) {
286 ScopedVector<autofill::PasswordForm> all_forms; 286 ScopedVector<autofill::PasswordForm> all_forms;
287 if (!GetLoginsList(nullptr, ALL_LOGINS, &all_forms)) 287 if (!GetLoginsList(nullptr, ALL_LOGINS, &all_forms))
288 return false; 288 return false;
289 289
290 for (auto& form : all_forms) { 290 for (auto* form : all_forms) {
291 if (origin_filter.Run(form->origin) && !form->skip_zero_click) { 291 if (origin_filter.Run(form->origin) && !form->skip_zero_click) {
292 form->skip_zero_click = true; 292 form->skip_zero_click = true;
293 if (!UpdateLogin(*form, changes)) 293 if (!UpdateLogin(*form, changes))
294 return false; 294 return false;
295 } 295 }
296 } 296 }
297 297
298 return true; 298 return true;
299 } 299 }
300 300
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 ScopedVector<autofill::PasswordForm>* forms) { 462 ScopedVector<autofill::PasswordForm>* forms) {
463 forms->clear(); 463 forms->clear();
464 ScopedVector<autofill::PasswordForm> all_forms; 464 ScopedVector<autofill::PasswordForm> all_forms;
465 if (!GetLoginsList(nullptr, ALL_LOGINS, &all_forms)) 465 if (!GetLoginsList(nullptr, ALL_LOGINS, &all_forms))
466 return false; 466 return false;
467 467
468 base::Time autofill::PasswordForm::*date_member = 468 base::Time autofill::PasswordForm::*date_member =
469 date_to_compare == CREATION_TIMESTAMP 469 date_to_compare == CREATION_TIMESTAMP
470 ? &autofill::PasswordForm::date_created 470 ? &autofill::PasswordForm::date_created
471 : &autofill::PasswordForm::date_synced; 471 : &autofill::PasswordForm::date_synced;
472 for (auto& saved_form : all_forms) { 472 for (auto*& saved_form : all_forms) {
473 if (get_begin <= saved_form->*date_member && 473 if (get_begin <= saved_form->*date_member &&
474 (get_end.is_null() || saved_form->*date_member < get_end)) { 474 (get_end.is_null() || saved_form->*date_member < get_end)) {
475 forms->push_back(saved_form); 475 forms->push_back(saved_form);
476 saved_form = nullptr; 476 saved_form = nullptr;
477 } 477 }
478 } 478 }
479 479
480 return true; 480 return true;
481 } 481 }
482 482
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 if (lookup_form) { 558 if (lookup_form) {
559 UMA_HISTOGRAM_ENUMERATION("PasswordManager.PslDomainMatchTriggering", 559 UMA_HISTOGRAM_ENUMERATION("PasswordManager.PslDomainMatchTriggering",
560 allow_psl_match 560 allow_psl_match
561 ? psl_domain_match_metric 561 ? psl_domain_match_metric
562 : password_manager::PSL_DOMAIN_MATCH_NOT_USED, 562 : password_manager::PSL_DOMAIN_MATCH_NOT_USED,
563 password_manager::PSL_DOMAIN_MATCH_COUNT); 563 password_manager::PSL_DOMAIN_MATCH_COUNT);
564 } 564 }
565 g_list_free(found); 565 g_list_free(found);
566 return forms; 566 return forms;
567 } 567 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698