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

Side by Side Diff: chrome/browser/ui/webui/options/password_manager_handler.cc

Issue 1958823002: Fix implicit access to raw pointer of scoped_refptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Splitting out change to scoped_refptr to follow up patch. Created 4 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/webui/options/password_manager_handler.h" 5 #include "chrome/browser/ui/webui/options/password_manager_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/feature_list.h" 9 #include "base/feature_list.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 scoped_refptr<password_manager::PasswordStore> store( 368 scoped_refptr<password_manager::PasswordStore> store(
369 PasswordStoreFactory::GetForProfile(profile_, 369 PasswordStoreFactory::GetForProfile(profile_,
370 ServiceAccessType::EXPLICIT_ACCESS)); 370 ServiceAccessType::EXPLICIT_ACCESS));
371 if (store) { 371 if (store) {
372 for (const autofill::PasswordForm& form : forms) { 372 for (const autofill::PasswordForm& form : forms) {
373 store->AddLogin(form); 373 store->AddLogin(form);
374 } 374 }
375 } 375 }
376 UMA_HISTOGRAM_BOOLEAN("PasswordManager.StorePasswordImportedFromCSVResult", 376 UMA_HISTOGRAM_BOOLEAN("PasswordManager.StorePasswordImportedFromCSVResult",
377 store); 377 static_cast<bool>(store));
378 } 378 }
379 379
380 void PasswordManagerHandler::HandlePasswordExport(const base::ListValue* args) { 380 void PasswordManagerHandler::HandlePasswordExport(const base::ListValue* args) {
381 #if !defined(OS_ANDROID) // This is never called on Android. 381 #if !defined(OS_ANDROID) // This is never called on Android.
382 if (!password_manager_presenter_->IsUserAuthenticated()) 382 if (!password_manager_presenter_->IsUserAuthenticated())
383 return; 383 return;
384 384
385 ui::SelectFileDialog::FileTypeInfo file_type_info; 385 ui::SelectFileDialog::FileTypeInfo file_type_info;
386 file_type_info.extensions = 386 file_type_info.extensions =
387 password_manager::PasswordExporter::GetSupportedFileExtensions(); 387 password_manager::PasswordExporter::GetSupportedFileExtensions();
(...skipping 16 matching lines...) Expand all
404 password_manager_presenter_->GetAllPasswords(); 404 password_manager_presenter_->GetAllPasswords();
405 UMA_HISTOGRAM_COUNTS("PasswordManager.ExportedPasswordsPerUserInCSV", 405 UMA_HISTOGRAM_COUNTS("PasswordManager.ExportedPasswordsPerUserInCSV",
406 password_list.size()); 406 password_list.size());
407 password_manager::PasswordExporter::Export( 407 password_manager::PasswordExporter::Export(
408 path, password_list, content::BrowserThread::GetMessageLoopProxyForThread( 408 path, password_list, content::BrowserThread::GetMessageLoopProxyForThread(
409 content::BrowserThread::FILE) 409 content::BrowserThread::FILE)
410 .get()); 410 .get());
411 } 411 }
412 412
413 } // namespace options 413 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/certificate_selector_browsertest.cc ('k') | components/drive/drive_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698