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

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

Issue 644053003: [Password Manager] Add UMA stats for custom passphrase users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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/password_store_mac.h" 5 #include "chrome/browser/password_manager/password_store_mac.h"
6 #include "chrome/browser/password_manager/password_store_mac_internal.h" 6 #include "chrome/browser/password_manager/password_store_mac_internal.h"
7 7
8 #include <CoreServices/CoreServices.h> 8 #include <CoreServices/CoreServices.h>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 895
896 // Mac stores passwords in the system keychain, which can block for an 896 // Mac stores passwords in the system keychain, which can block for an
897 // arbitrarily long time (most notably, it can block on user confirmation 897 // arbitrarily long time (most notably, it can block on user confirmation
898 // from a dialog). Run tasks on a dedicated thread to avoid blocking the DB 898 // from a dialog). Run tasks on a dedicated thread to avoid blocking the DB
899 // thread. 899 // thread.
900 scoped_refptr<base::SingleThreadTaskRunner> 900 scoped_refptr<base::SingleThreadTaskRunner>
901 PasswordStoreMac::GetBackgroundTaskRunner() { 901 PasswordStoreMac::GetBackgroundTaskRunner() {
902 return (thread_.get()) ? thread_->message_loop_proxy() : NULL; 902 return (thread_.get()) ? thread_->message_loop_proxy() : NULL;
903 } 903 }
904 904
905 void PasswordStoreMac::ReportMetricsImpl(const std::string& sync_username) { 905 void PasswordStoreMac::ReportMetricsImpl(PasswordManagerClient* client) {
906 login_metadata_db_->ReportMetrics(sync_username); 906 login_metadata_db_->ReportMetrics(client);
907 } 907 }
908 908
909 PasswordStoreChangeList PasswordStoreMac::AddLoginImpl( 909 PasswordStoreChangeList PasswordStoreMac::AddLoginImpl(
910 const PasswordForm& form) { 910 const PasswordForm& form) {
911 DCHECK(thread_->message_loop() == base::MessageLoop::current()); 911 DCHECK(thread_->message_loop() == base::MessageLoop::current());
912 PasswordStoreChangeList changes; 912 PasswordStoreChangeList changes;
913 if (AddToKeychainIfNecessary(form)) { 913 if (AddToKeychainIfNecessary(form)) {
914 changes = login_metadata_db_->AddLogin(form); 914 changes = login_metadata_db_->AddLogin(form);
915 } 915 }
916 return changes; 916 return changes;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 1150
1151 ScopedVector<PasswordForm> merged_forms; 1151 ScopedVector<PasswordForm> merged_forms;
1152 merged_forms.get() = internal_keychain_helpers::GetPasswordsForForms( 1152 merged_forms.get() = internal_keychain_helpers::GetPasswordsForForms(
1153 *keychain_, &database_forms); 1153 *keychain_, &database_forms);
1154 1154
1155 // Clean up any orphaned database entries. 1155 // Clean up any orphaned database entries.
1156 RemoveDatabaseForms(database_forms); 1156 RemoveDatabaseForms(database_forms);
1157 1157
1158 forms->insert(forms->end(), database_forms.begin(), database_forms.end()); 1158 forms->insert(forms->end(), database_forms.begin(), database_forms.end());
1159 } 1159 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698