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

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

Issue 2133083002: Remove all remaining traces of MessageLoopProxy. (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 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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 reinterpret_cast<void*>(IMPORT_FILE_SELECTED)); 339 reinterpret_cast<void*>(IMPORT_FILE_SELECTED));
340 #endif 340 #endif
341 } 341 }
342 342
343 void PasswordManagerHandler::ImportPasswordFileSelected( 343 void PasswordManagerHandler::ImportPasswordFileSelected(
344 const base::FilePath& path) { 344 const base::FilePath& path) {
345 scoped_refptr<ImportPasswordResultConsumer> form_consumer( 345 scoped_refptr<ImportPasswordResultConsumer> form_consumer(
346 new ImportPasswordResultConsumer(GetProfile())); 346 new ImportPasswordResultConsumer(GetProfile()));
347 347
348 password_manager::PasswordImporter::Import( 348 password_manager::PasswordImporter::Import(
349 path, content::BrowserThread::GetMessageLoopProxyForThread( 349 path, content::BrowserThread::GetTaskRunnerForThread(
350 content::BrowserThread::FILE) 350 content::BrowserThread::FILE)
351 .get(), 351 .get(),
352 base::Bind(&ImportPasswordResultConsumer::ConsumePassword, 352 base::Bind(&ImportPasswordResultConsumer::ConsumePassword,
353 form_consumer)); 353 form_consumer));
354 } 354 }
355 355
356 PasswordManagerHandler::ImportPasswordResultConsumer:: 356 PasswordManagerHandler::ImportPasswordResultConsumer::
357 ImportPasswordResultConsumer(Profile* profile) 357 ImportPasswordResultConsumer(Profile* profile)
358 : profile_(profile) {} 358 : profile_(profile) {}
359 359
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 #endif 402 #endif
403 } 403 }
404 404
405 void PasswordManagerHandler::ExportPasswordFileSelected( 405 void PasswordManagerHandler::ExportPasswordFileSelected(
406 const base::FilePath& path) { 406 const base::FilePath& path) {
407 std::vector<std::unique_ptr<autofill::PasswordForm>> password_list = 407 std::vector<std::unique_ptr<autofill::PasswordForm>> password_list =
408 password_manager_presenter_->GetAllPasswords(); 408 password_manager_presenter_->GetAllPasswords();
409 UMA_HISTOGRAM_COUNTS("PasswordManager.ExportedPasswordsPerUserInCSV", 409 UMA_HISTOGRAM_COUNTS("PasswordManager.ExportedPasswordsPerUserInCSV",
410 password_list.size()); 410 password_list.size());
411 password_manager::PasswordExporter::Export( 411 password_manager::PasswordExporter::Export(
412 path, password_list, content::BrowserThread::GetMessageLoopProxyForThread( 412 path, password_list, content::BrowserThread::GetTaskRunnerForThread(
413 content::BrowserThread::FILE) 413 content::BrowserThread::FILE)
414 .get()); 414 .get());
415 } 415 }
416 416
417 } // namespace options 417 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698