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

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

Issue 2442953002: Remove stl_util's deletion function use from chrome/. (Closed)
Patch Set: fix Created 4 years, 1 month 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_x.h" 5 #include "chrome/browser/password_manager/password_store_x.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/files/file_util.h" 14 #include "base/files/file_util.h"
15 #include "base/files/scoped_temp_dir.h" 15 #include "base/files/scoped_temp_dir.h"
16 #include "base/memory/ptr_util.h" 16 #include "base/memory/ptr_util.h"
17 #include "base/run_loop.h" 17 #include "base/run_loop.h"
18 #include "base/stl_util.h"
19 #include "base/strings/string_util.h" 18 #include "base/strings/string_util.h"
20 #include "base/strings/stringprintf.h" 19 #include "base/strings/stringprintf.h"
21 #include "base/strings/utf_string_conversions.h" 20 #include "base/strings/utf_string_conversions.h"
22 #include "base/threading/thread_task_runner_handle.h" 21 #include "base/threading/thread_task_runner_handle.h"
23 #include "base/time/time.h" 22 #include "base/time/time.h"
24 #include "chrome/test/base/testing_browser_process.h" 23 #include "chrome/test/base/testing_browser_process.h"
25 #include "components/password_manager/core/browser/password_manager_test_utils.h " 24 #include "components/password_manager/core/browser/password_manager_test_utils.h "
26 #include "components/password_manager/core/browser/password_store_change.h" 25 #include "components/password_manager/core/browser/password_store_change.h"
27 #include "components/password_manager/core/browser/password_store_consumer.h" 26 #include "components/password_manager/core/browser/password_store_consumer.h"
28 #include "components/password_manager/core/browser/password_store_origin_unittes t.h" 27 #include "components/password_manager/core/browser/password_store_origin_unittes t.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 391
393 base::FilePath test_login_db_file_path() const { 392 base::FilePath test_login_db_file_path() const {
394 return temp_dir_.GetPath().Append(FILE_PATH_LITERAL("login_test")); 393 return temp_dir_.GetPath().Append(FILE_PATH_LITERAL("login_test"));
395 } 394 }
396 395
397 content::TestBrowserThreadBundle thread_bundle_; 396 content::TestBrowserThreadBundle thread_bundle_;
398 397
399 base::ScopedTempDir temp_dir_; 398 base::ScopedTempDir temp_dir_;
400 }; 399 };
401 400
402 ACTION(STLDeleteElements0) {
403 base::STLDeleteContainerPointers(arg0.begin(), arg0.end());
404 }
405
406 TEST_P(PasswordStoreXTest, Notifications) { 401 TEST_P(PasswordStoreXTest, Notifications) {
407 std::unique_ptr<password_manager::LoginDatabase> login_db( 402 std::unique_ptr<password_manager::LoginDatabase> login_db(
408 new password_manager::LoginDatabase(test_login_db_file_path())); 403 new password_manager::LoginDatabase(test_login_db_file_path()));
409 scoped_refptr<PasswordStoreX> store(new PasswordStoreX( 404 scoped_refptr<PasswordStoreX> store(new PasswordStoreX(
410 base::ThreadTaskRunnerHandle::Get(), base::ThreadTaskRunnerHandle::Get(), 405 base::ThreadTaskRunnerHandle::Get(), base::ThreadTaskRunnerHandle::Get(),
411 std::move(login_db), GetBackend(GetParam()))); 406 std::move(login_db), GetBackend(GetParam())));
412 store->Init(syncer::SyncableService::StartSyncFlare()); 407 store->Init(syncer::SyncableService::StartSyncFlare());
413 408
414 password_manager::PasswordFormData form_data = { 409 password_manager::PasswordFormData form_data = {
415 PasswordForm::SCHEME_HTML, 410 PasswordForm::SCHEME_HTML,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 578
584 INSTANTIATE_TEST_CASE_P(NoBackend, 579 INSTANTIATE_TEST_CASE_P(NoBackend,
585 PasswordStoreXTest, 580 PasswordStoreXTest,
586 testing::Values(NO_BACKEND)); 581 testing::Values(NO_BACKEND));
587 INSTANTIATE_TEST_CASE_P(FailingBackend, 582 INSTANTIATE_TEST_CASE_P(FailingBackend,
588 PasswordStoreXTest, 583 PasswordStoreXTest,
589 testing::Values(FAILING_BACKEND)); 584 testing::Values(FAILING_BACKEND));
590 INSTANTIATE_TEST_CASE_P(WorkingBackend, 585 INSTANTIATE_TEST_CASE_P(WorkingBackend,
591 PasswordStoreXTest, 586 PasswordStoreXTest,
592 testing::Values(WORKING_BACKEND)); 587 testing::Values(WORKING_BACKEND));
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_win_unittest.cc ('k') | chrome/browser/plugins/plugin_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698