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

Unified Diff: chrome/browser/browsing_data/passwords_counter_browsertest.cc

Issue 2153863002: Move counters for passwords, history and autofill to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@separate_build_targets_in_components_bd
Patch Set: Addressed comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browsing_data/passwords_counter.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data/passwords_counter_browsertest.cc
diff --git a/chrome/browser/browsing_data/passwords_counter_browsertest.cc b/chrome/browser/browsing_data/passwords_counter_browsertest.cc
index a5be7fff6296ea228c7231cd9ffcc32232747e89..acb8219068bf1ef1dff280ea4be2cd4514cfb7fe 100644
--- a/chrome/browser/browsing_data/passwords_counter_browsertest.cc
+++ b/chrome/browser/browsing_data/passwords_counter_browsertest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/browsing_data/passwords_counter.h"
+#include "components/browsing_data/core/counters/passwords_counter.h"
#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
@@ -136,7 +136,8 @@ IN_PROC_BROWSER_TEST_F(PasswordsCounterTest, SameDomain) {
AddLogin("https://www.chrome.com", "user2", false);
Profile* profile = browser()->profile();
- PasswordsCounter counter(profile);
+ browsing_data::PasswordsCounter counter(PasswordStoreFactory::GetForProfile(
+ profile, ServiceAccessType::EXPLICIT_ACCESS));
counter.Init(profile->GetPrefs(), base::Bind(&PasswordsCounterTest::Callback,
base::Unretained(this)));
counter.Restart();
@@ -152,7 +153,9 @@ IN_PROC_BROWSER_TEST_F(PasswordsCounterTest, Blacklisted) {
AddLogin("https://www.chrome.com", "user3", true);
Profile* profile = browser()->profile();
- PasswordsCounter counter(profile);
+ browsing_data::PasswordsCounter counter(PasswordStoreFactory::GetForProfile(
+ profile, ServiceAccessType::EXPLICIT_ACCESS));
+
counter.Init(profile->GetPrefs(), base::Bind(&PasswordsCounterTest::Callback,
base::Unretained(this)));
counter.Restart();
@@ -169,7 +172,8 @@ IN_PROC_BROWSER_TEST_F(PasswordsCounterTest, PrefChanged) {
AddLogin("https://www.chrome.com", "user", false);
Profile* profile = browser()->profile();
- PasswordsCounter counter(profile);
+ browsing_data::PasswordsCounter counter(PasswordStoreFactory::GetForProfile(
+ profile, ServiceAccessType::EXPLICIT_ACCESS));
counter.Init(profile->GetPrefs(), base::Bind(&PasswordsCounterTest::Callback,
base::Unretained(this)));
SetPasswordsDeletionPref(true);
@@ -185,7 +189,8 @@ IN_PROC_BROWSER_TEST_F(PasswordsCounterTest, PrefIsFalse) {
AddLogin("https://www.google.com", "user", false);
Profile* profile = browser()->profile();
- PasswordsCounter counter(profile);
+ browsing_data::PasswordsCounter counter(PasswordStoreFactory::GetForProfile(
+ profile, ServiceAccessType::EXPLICIT_ACCESS));
counter.Init(profile->GetPrefs(), base::Bind(&PasswordsCounterTest::Callback,
base::Unretained(this)));
counter.Restart();
@@ -199,7 +204,8 @@ IN_PROC_BROWSER_TEST_F(PasswordsCounterTest, StoreChanged) {
AddLogin("https://www.google.com", "user", false);
Profile* profile = browser()->profile();
- PasswordsCounter counter(profile);
+ browsing_data::PasswordsCounter counter(PasswordStoreFactory::GetForProfile(
+ profile, ServiceAccessType::EXPLICIT_ACCESS));
counter.Init(profile->GetPrefs(), base::Bind(&PasswordsCounterTest::Callback,
base::Unretained(this)));
counter.Restart();
@@ -228,7 +234,8 @@ IN_PROC_BROWSER_TEST_F(PasswordsCounterTest, PeriodChanged) {
AddLogin("https://www.chrome.com", "user", false);
Profile* profile = browser()->profile();
- PasswordsCounter counter(profile);
+ browsing_data::PasswordsCounter counter(PasswordStoreFactory::GetForProfile(
+ profile, ServiceAccessType::EXPLICIT_ACCESS));
counter.Init(profile->GetPrefs(), base::Bind(&PasswordsCounterTest::Callback,
base::Unretained(this)));
« no previous file with comments | « chrome/browser/browsing_data/passwords_counter.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698