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

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

Issue 1083083007: Substitued pattern push_back(ptr.release()) with push_back(ptr.Pass()) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: release Pass substitution Created 5 years, 8 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 <dlfcn.h> 7 #include <dlfcn.h>
8 #include <list> 8 #include <list>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 form->signon_realm = lookup_form->signon_realm; 594 form->signon_realm = lookup_form->signon_realm;
595 form->origin = lookup_form->origin; 595 form->origin = lookup_form->origin;
596 } 596 }
597 SecretValue* secretValue = secret_item_get_secret(secretItem); 597 SecretValue* secretValue = secret_item_get_secret(secretItem);
598 if (secretValue) { 598 if (secretValue) {
599 form->password_value = UTF8ToUTF16(secret_value_get_text(secretValue)); 599 form->password_value = UTF8ToUTF16(secret_value_get_text(secretValue));
600 secret_value_unref(secretValue); 600 secret_value_unref(secretValue);
601 } else { 601 } else {
602 VLOG(1) << "Unable to access password from list element!"; 602 VLOG(1) << "Unable to access password from list element!";
603 } 603 }
604 forms.push_back(form.release()); 604 forms.push_back(form.Pass());
605 } else { 605 } else {
606 VLOG(1) << "Could not initialize PasswordForm from attributes!"; 606 VLOG(1) << "Could not initialize PasswordForm from attributes!";
607 } 607 }
608 } 608 }
609 609
610 if (lookup_form) { 610 if (lookup_form) {
611 const GURL signon_realm(lookup_form->signon_realm); 611 const GURL signon_realm(lookup_form->signon_realm);
612 std::string registered_domain = 612 std::string registered_domain =
613 password_manager::GetRegistryControlledDomain(signon_realm); 613 password_manager::GetRegistryControlledDomain(signon_realm);
614 UMA_HISTOGRAM_ENUMERATION( 614 UMA_HISTOGRAM_ENUMERATION(
615 "PasswordManager.PslDomainMatchTriggering", 615 "PasswordManager.PslDomainMatchTriggering",
616 password_manager::ShouldPSLDomainMatchingApply(registered_domain) 616 password_manager::ShouldPSLDomainMatchingApply(registered_domain)
617 ? psl_domain_match_metric 617 ? psl_domain_match_metric
618 : password_manager::PSL_DOMAIN_MATCH_NOT_USED, 618 : password_manager::PSL_DOMAIN_MATCH_NOT_USED,
619 password_manager::PSL_DOMAIN_MATCH_COUNT); 619 password_manager::PSL_DOMAIN_MATCH_COUNT);
620 } 620 }
621 g_list_free(found); 621 g_list_free(found);
622 return forms.Pass(); 622 return forms.Pass();
623 } 623 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698